-
Notifications
You must be signed in to change notification settings - Fork 150
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
Add strikethrough formatting #1809
Conversation
With this applied, diff --git a/src/irc/formatting.ts b/src/irc/formatting.ts
index 136b7f18..e3d4d2e6 100644
--- a/src/irc/formatting.ts
+++ b/src/irc/formatting.ts
@@ -262,13 +262,13 @@ export function ircToHtml(text: string): string {
// Replace all mIRC formatting characters.
// The color character can have arguments.
// The regex matches:
- // - Any single 'simple' formatting character: \x02, \x11, \x1d, \x1f, \x0f and
- // \x16 for bold, italics, underline, reset and reverse respectively.
+ // - Any single 'simple' formatting character: \x02, \x11, \x1d, \x1e, \x1f, \x0f and
+ // \x16 for bold, italics, underline, strikethrough, reset and reverse respectively.
// - The colour formatting character (\x03) followed by 0 to 2 digits for
// the foreground colour and (optionally) a comma and 1-2 digits for the
// background colour.
// eslint-disable-next-line no-control-regex
- const colorRegex = /[\x02\x11\x1d\x1f\x0f\x16]|\x03(\d{0,2})(?:,(\d{1,2}))?/g;
+ const colorRegex = /[\x02\x11\x1d\x1e\x1f\x0f\x16]|\x03(\d{0,2})(?:,(\d{1,2}))?/g;
// Maintain a small state machine of which tags are open so we can close the right
// ones on RESET codes and toggle appropriately if they do the same code again. It doesn't seem to work for me from Matrix to Hexchat though; what did you test this on? |
The change seemed so simple that I hoped that the unit tests would be more than sufficient. |
Fixed it up in thomwiggers#1 |
@tadzik thanks! |
Looks good, but we'll need a signoff and a changelog entry: see https://github.com/matrix-org/matrix-appservice-bridge/blob/develop/CONTRIBUTING.md#%EF%B8%8F-pull-requests |
cd06c4d
to
50c4b78
Compare
I've rebased, squashed, signed off and fixed the name of the changelog file. |
The failing changelog test seems due to a |
Thanks to Tadeusz Sośnierz (@tadzik) for contributions integrated in this squashed commit. Signed-off-by: Thom Wiggers <[email protected]>
50c4b78
to
d84ce8c
Compare
Rebased on #1813 |
No description provided.