Colored keyword/phrase does not trigger factoid
Italic, bold, and underlined keywords will still trigger their associated factoids (the entire response is formatted like the trigger), but colored keywords do not.
My hunch was that the control characters are stripped out and saved for use when outputting the tidbit, but the foreground color digits (and optional comma + background color digits) following the color control characters are not saved. So when Bucket reuses the color control characters, they end up being "no color" (^C without a color following it resets to default).
Testing revealed that Bucket is indeed stripping out the color control character (\x03) but it is not reused when sending the tidbit. However, the fact is matched including the color control digits, and it probably should not be. (I added an alias from 05test to test in my instance after sending \x0305test, or "test" in maroon/brown, failed to trigger test; it did trigger the alias.)
The fix for this is removing the specified color digits following the control character when control codes are stripped out.
As mentioned in the other issue, I think all formatting should be stripped from triggers before they're matched.
On Sat, Oct 1, 2016 at 2:58 PM dgw [email protected] wrote:
Italic, bold, and underlined keywords will still trigger their associated factoids (the entire response is formatted like the trigger), but colored keywords do not.
My hunch was that the control characters are stripped out and saved for use when outputting the tidbit, but the foreground color digits (and optional comma + background color digits) following the color control characters are not saved. So when Bucket reuses the color control characters, they end up being "no color" (^C without a color following it resets to default).
Testing revealed that Bucket is indeed stripping out the color control character (\x03) but it is not reused when sending the tidbit. However, the fact is matched including the color control digits, and it probably should not be. (I added an alias from 05test to test in my instance after sending \x0305test, or "test" in maroon/brown, failed to trigger test; it did trigger the alias.)
The fix for this is removing the specified color digits following the control character when control codes are stripped out.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zigdon/xkcd-Bucket/issues/87, or mute the thread https://github.com/notifications/unsubscribe-auth/AACtVO1rNDOhy-UF4y2rf9nVjDjfsUH_ks5qvteOgaJpZM4KL4Ad .