src/renderer/src/lib/format.ts handles Markdown and BBCode and knows nothing about IRC's own formatting: \x03 colour pairs, \x02 bold, \x1D italic, \x1F underline, \x16 reverse, \x0F reset.
On a channel where anyone uses colour - which is most of them, and every bot - the codes arrive as invisible or garbage characters inside the text.
Done looks like: the codes are parsed and rendered, with a setting to strip them instead (HexChat has exactly that switch), and the composer can send at least bold/italic/underline.
`src/renderer/src/lib/format.ts` handles Markdown and BBCode and knows nothing about IRC's own formatting: `\x03` colour pairs, `\x02` bold, `\x1D` italic, `\x1F` underline, `\x16` reverse, `\x0F` reset.
On a channel where anyone uses colour - which is most of them, and every bot - the codes arrive as invisible or garbage characters inside the text.
**Done looks like:** the codes are parsed and rendered, with a setting to strip them instead (HexChat has exactly that switch), and the composer can send at least bold/italic/underline.
Finished. Bold, italic, underline, reverse, reset, and both colour forms — the numbered \x03fg,bg and the hex \x04RRGGBB — are rendered in mIRC's own palette, which is what every other client draws. A setting strips them instead, the same switch HexChat has and for the same reason.
Only IRC's traffic is drawn with them; everywhere else they are stripped, because a control character in a Discord message is something somebody pasted rather than formatting. The sanitiser learnt four more style properties to allow this, each validated against its own pattern — a style attribute on somebody else's message is a large surface.
Finished. Bold, italic, underline, reverse, reset, and both colour forms — the numbered `\x03fg,bg` and the hex `\x04RRGGBB` — are rendered in mIRC's own palette, which is what every other client draws. A setting strips them instead, the same switch HexChat has and for the same reason.
Only IRC's traffic is drawn with them; everywhere else they are stripped, because a control character in a Discord message is something somebody pasted rather than formatting. The sanitiser learnt four more style properties to allow this, each validated against its own pattern — a style attribute on somebody else's message is a large surface.
nobilis f4c097c, moho https://git.salastil.com/Salastil/moho/commit/0d57bd0
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
src/renderer/src/lib/format.tshandles Markdown and BBCode and knows nothing about IRC's own formatting:\x03colour pairs,\x02bold,\x1Ditalic,\x1Funderline,\x16reverse,\x0Freset.On a channel where anyone uses colour - which is most of them, and every bot - the codes arrive as invisible or garbage characters inside the text.
Done looks like: the codes are parsed and rendered, with a setting to strip them instead (HexChat has exactly that switch), and the composer can send at least bold/italic/underline.
Finished. Bold, italic, underline, reverse, reset, and both colour forms — the numbered
\x03fg,bgand the hex\x04RRGGBB— are rendered in mIRC's own palette, which is what every other client draws. A setting strips them instead, the same switch HexChat has and for the same reason.Only IRC's traffic is drawn with them; everywhere else they are stripped, because a control character in a Discord message is something somebody pasted rather than formatting. The sanitiser learnt four more style properties to allow this, each validated against its own pattern — a style attribute on somebody else's message is a large surface.
nobilis f4c097c, moho https://git.salastil.com/Salastil/moho/commit/0d57bd0