zachbr / Dis4IRC

A modern Discord <-> IRC bridge
MIT License
51 stars 18 forks source link

Print markdown symbols in IRC for inline code blocks, bold, etc. #83

Open ilyagr opened 1 week ago

ilyagr commented 1 week ago

Ideally, this would be configured in the settings, but for now it is unconditional.

For this reason, I'll make this a draft PR, to be used by anybody who needs this. Feel free to take it as is if you feel like it, or I might improve it later.


In many IRC clients, including goguma/gamja/senpai (all the clients with good support for soju bouncers like https://chat.sr.ht), the formatting Dis4IRC previously used for this is invisible. For them, preserving the backticks, starts, etc, is very helpful.

Partially fixes #81. (I did not address multi-line code blocks)


Here's what the IRC side of this looks like for gamja (default client for chat.sr.ht):

image

Before this PR, there would not be backticks or stars in there. I filed an issue about it, no idea if it would be fixed. (And I'm not familiar enough with IRC formatting to fix it myself)

Here's what this PR looks like for a client that supports formatting (Textual, takes effort to make work with soju and the interaction glitches):

image

I think this is not too bad. In fact, the monospace in this client is not very easy to see without backticks since it doesn't change the background for monospace by default.