Okay, I made a bit of a testing Command Brief to fiddle with that contains a lot of the common usage variations that can be found in a briefing.
I performed testing on the following in windowed mode running at 1024x768 and requires either
Testing Build based on 5755 or Nightly 5758 (or later).
(additionally, changing $V, $p and $y to something else will work just as well)
$Stage Text:
XSTR("Briefing Color Test
This is a series of example $V strings, for the purpose of testing briefing colorization. This test includes $b hyphenated-words, words in $g $quotequotation$quote, as well as prefixes like $y Mr. and $y Dr. as well as pluralized forms such as $b portal's and $f Aquitane's, to name a few. Additional $quote$g quoted$quote test. Some $p (TLA) and ($p TLA) tests. A $g GTVA. Test.
Another test on $b hyphenated-words, as a secondary example.
$y Additionally: $b hyphenated-$g words as a third example.
We are also going to test $r exclusions, with $g Alpha's and $g Beta's help.
We will also be testing ending $r words.
We also need to test, when as ending $y words: quoted $g $quotewords$quote.
$b Hyphenated-Words.
And pluralized $r word's.", -1)
$end_multi_text
$Ani Filename: <NONE>
+Wave Filename: <NONE>
Here is the current form of output by the engine:
Briefing Color Test
This is a series of example strings, for the purpose of testing briefing colorization. This test includes hyphenated-words,
words in "quotation", as well as prefixes like Mr. and Dr. as well as pluralized forms such as portal's and Aquitane's, to
name a few. Additional "quoted" test. Some (TLA) and (TLA) tests. A GTVA. Test.
Another test on hyphenated-words, as a secondary example.
Additionally: hyphenated-words as a third example.
We are also going to test exclusions, with Alpha's and Beta's help.
We will also be testing ending words.
We also need to test, when as ending words: quoted "words".
Hyphenated-Words.
And pluralized word's.
Note how the first case of "hyphenated-words," is not colored? That's because it's at the end of the display line in the viewer, so it doesn't get colored like the second one does.
Interestingly enough, the third case ignores the $b and colorizes fully in green and the Additional "quoted" test is also fully in green and both of the (TLA) including the ()'s are colored.
Here is the out-put from the current proposed patch:
Briefing Color Test
This is a series of example strings, for the purpose of testing briefing colorization. This test includes hyphenated-words,
words in "quotation", as well as prefixes like Mr. and Dr. as well as pluralized forms such as portal's and Aquitane's, to
name a few. Additional "quoted" test. Some (TLA) and (TLA) tests. A GTVA. Test.
Another test on hyphenated-words, as a secondary example.
Additionally: hyphenated-words as a third example.
We are also going to test exclusions, with Alpha's and Beta's help.
We will also be testing ending words.
We also need to test, when as ending words: quoted "words".
Hyphenated-Words.
And pluralized word's.
This comes very close to almost doing it. I like that it clips the , that breaks up sentences, but it totally destroys hyphenated and quoted words and doesn't react well to Dr. or Mr. at all, even though it get's the very last word as well as words at the line wrap. Do note however that it handles the third case of hyphenated words example correctly, as well as the additional "quoted" test
Here is an example of what we are going to be aiming for:
Briefing Color Test
This is a series of example strings, for the purpose of testing briefing colorization. This test includes hyphenated-words,
words in "quotation", as well as prefixes like Mr. and Dr. as well as pluralized forms such as portal's and Aquitane's, to
name a few. Additional "quoted" test. Some (TLA) and (TLA) tests. A GTVA. Test.
Another test on hyphenated-words, as a secondary example.
Additionally: hyphenated-words as a third example.
We are also going to test exclusions, with Alpha's and Beta's help.
We will also be testing ending words.
We also need to test, when as ending words: quoted "words".
Hyphenated-Words.
And pluralized word's.
Note that while "Additionally:" is all yellow, "words:" only has "words" in yellow. And we appear to be getting schizoid with our colorization of 's.
How are we going to achieve when it does or does not manage to color a . (period) ,(comma) '(single quote)? Well, the , character could and should probably be ignored, which the current patch does. And if the .(period) is the very last item before a return it should probably be ignored, but we don't want it ignoring all other period cases that are not newlines unless we tell it to do so.
Introducing the "Non-Breaking Space" character, "$|" idea.
With which we can turn the "($p TLA)" into "($p TLA$|)" without worrying about breaking the first "$p (TLA)" case by having it exclude ( or ).
We can keep "$ Dr." and "$y Mr." coloring the period without coloring it in "$g GTVA$|. Test."
We can also use it on "$y words$|:" without breaking being able to have "$y Additionally:" colored.
It will also allow us to keep "$b portal's" and "$g Aquitaine's" but show "$Alpha$|'s" and "$g Beta$|'s" without the 's being colored.
Watch this space for either an upcoming patch, or a call for assistance.