Fix flipped ANSI colour intensity flag bug and use canonical CGA colour tag names#2979
Fix flipped ANSI colour intensity flag bug and use canonical CGA colour tag names#2979
Conversation
Also change markup colour tags to use canonical CGA colour names instead of the symbolic ANSI colour names which would only cause confusion.
fbec6e3 to
b3a075c
Compare
|
Please merge this #2980 first. |
|
There were non-trivial conflicts with #2980, but resolved them and had to to combine the commits here before merge (which is OK - the nice script allows us to reverse the fields back to the previous values; nice script - @johnnovak !). @Kappa971, can you confirm the Italian translation made it through the process with your 2980 changes intact plus the new color tags? Expand the |
I think it's all intact, |
|
For context, the reason for the naming was simple, the lighter colour variants had a I used the ANSI colours, because that's what I knew about, and was consistent with all the other escape sequences. |
Yup, no problem @shermp. Your markup handler is very nice, and there's nice unit test coverage too! Using the ANSI names was a reasonable initial choice, but in practice, it turns out the "indirection" of ANSI names is cumbersome; a what-you-see-is-what-you-get approach is just better. Incremental improvement! 😎 🚀 |

Description
Our ANSI markup tag processor was buggy—the handling of low vs high intensity colours was flipped. E.g.,
[color=green]resulted in high intensity green (light green), and[color=light-green]in low intensity green. I noticed this about a year ago, but kinda glossed over it. People somehow got used to this weirdness and marked up brown dutifully as[color=light-yellow]in theMOREcommand, for example. Err... 😐Also, the colour tags used the standard symbolic ANSI colour names which I found quite confusing even with the flipping corrected:
[color=yellow]would need to be specified for "brown".[color=light-yellow]would need to be specified for "yellow".[color=light-white]would need to be specified for "white".[color=white]would need to be specified for "light gray".[color=light-black]would need to be specified for "dark gray".As I see it, using the symbolic ANSI colour names has no benefits; it only creates a lot of confusion and their use is rather pointless as we're operating in a DOS context where CGA colour names are the norm. Therefore, I'm switching to using canonical CGA colour names as well. For reference:
I used the attached
remap-colors.shscript to remap all[color=XYZ]tags automatically to the new schema:Script (change extension to
.shafter downloading it): remap-colors.zipManual testing
Ran
INTRO,HELP,MIXER /?, andMORE FOO.TXTto test.Checklist
Please tick the items as you have addressed them. Don't remove items; leave the ones that are not applicable unchecked.
I have: