Open ilyagr opened 1 week ago
Hello, currently code blocks are formatted using the monospace formatting indicator 0x11
when being bridged to IRC.
Unfortunately, this is not widely supported by many IRC clients, but it is the only de facto standard for this I am aware of. While we may be able to just send a larger text block to represent this, I am leery to make the bot emit more lines than necessary where it can be avoided.
This is the current behavior on a client that supports the 0x11
formatting code:
As you can see, even on supported clients we're not properly prefixing successive lines with the monospace formatting code. So there's definitely work to be done here regardless.
Interesting, thanks!
It makes sense to prioritize fixing the actual bug that you mentioned.
For the rest of it, I'm just using the default web client somebody set up, that seems to be https://codeberg.org/emersion/gamja. I'm not sure how hard it would be to support this formatting code there (I don't know much about how IRC works), but I filed https://todo.sr.ht/~emersion/gamja/167 and https://todo.sr.ht/~emersion/goguma/160 for it.
Perhaps you could consider adding an option of leaving backticks in, instead of monospace?
Update: This makes sense especially for inline backticks since Dis4IRC converts backticks typed in IRC to Discord's code blocks. I think using both monospace and backticks is best for that. For multi-line code blocks, it's more questionable because it causes more lines, but I'd still use it if it was an option.
Are there free IRC clients that support this monospace extension? I'm mostly interested in Mac or Android, but you could document them in the README?
If I type in Discord:
16:29:18 <BridgeBot
> <ilyagr> def f(): 16:29:19 <BridgeBot
> <ilyagr> return 2 + 2 16:29:20 <BridgeBot`> <ilyagr>