Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colored keyword/phrase does not trigger factoid #87

Open
dgw opened this issue Oct 1, 2016 · 1 comment
Open

Colored keyword/phrase does not trigger factoid #87

dgw opened this issue Oct 1, 2016 · 1 comment
Assignees
Labels

Comments

@dgw
Copy link
Collaborator

dgw commented Oct 1, 2016

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.

@zigdon
Copy link
Owner

zigdon commented Oct 25, 2016

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
#87, or mute the thread
https://github.com/notifications/unsubscribe-auth/AACtVO1rNDOhy-UF4y2rf9nVjDjfsUH_ks5qvteOgaJpZM4KL4Ad
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants