Closed jrossignol closed 6 years ago
Now I remember KSP Modding... @inigmatus always finds the bugs that end up being hard to fix. ;)
Is &br working for line break in the current version of CC? Is it possible to use it to future-proof contracts?
No, &br; doesn't currently work. I may add it without changing anything on the \n stuff anyway.
On Sun, Mar 25, 2018, 10:09 PM theonegalen, notifications@github.com wrote:
Is &br working for line break in the current version of CC? Is it possible to use it to future-proof contracts?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jrossignol/ContractConfigurator/issues/654#issuecomment-376041060, or mute the thread https://github.com/notifications/unsubscribe-auth/AIUFdWVVrk_Pxlr7urJdZEXTJr9GvihZks5tiGnpgaJpZM4S6S67 .
no worries. not hyper critical. a workaround would be neat tho.
Given that 1.4.2 dropped today and I have no idea if there's a planned 1.4.3 I'll go ahead with the change to use &br;
Hmm... change could have a bigger impact that I initially thought (minor save breakage). Need to think on this one a bit yet.
Alright, so here's the current state with 16113bd1c1df0b9ba21a641e40b596d31a168b12. I now have it parsing both \n and &br; within config nodes anywhere. The default for the stuff in the save file is &br; internally, which works around the stock issue. The old newline (\n) is still available and will be the publicly documented way (but feel free to switch to &br;). Right now, newlines will have some problems with Module Manager, due to the stock bug.
This way things should "just work" when we get a stock fix, and I don't have to go and break a bunch of existing contract packs that aren't maintained. If you choose to use &br;, that's fine as that will always be supported moving forward.
confirmed fixed.
Brought up by @inigmatus on the forum:
Turns out the issue is much more of a pain than I thought, as it's rooted in the fact that the Localizer (Lingoona, specifically) are "helping" by unescaping the '\n'. Even if I could workaround the issue, it causes a problem in Module Manager caching (https://github.com/sarbian/ModuleManager/issues/84), so there's no point fixing it if it's not also fixed in MM. Best option is to hope for a KSP fix on #16315, which I've already bugged @JPLRepo about.
If that turns out not to be an option, will need to stop using '\n' and change to &br; as the escape string. Impacts to lots of contracts in the wild.