42wim/matterircd

please support mattermost code blocks

jdstrand opened this issue · 3 comments

#201 describes how to make ASCII art work with matterircd and irssi, but it doesn't work great for code blocks. I have set PasteBufferTimeout = 2500 and used the irssi settings in #201 (comment), but can only get proper code block formatting sporadically. Eg, I was able on occasion to paste this (note, leading and trailing blank lines are important):

```

this:
  will:
  - hopefully
  work: true

```

but this doesn't work consistently. https://docs.mattermost.com/help/messaging/formatting-text.html describes two different ways to do code comments. It seems like the PasteBufferTimeout = 2500 concept would work great if we could tell matterircd to wrap the pasted text in ```'s somehow....

EDIT: this is with 0.20-dev, commit ce64e2c.

+10 in this one, would be great. I wondered if we could trap a "/code"in IRC and inject that on mattermost like text within ```

42wim commented

I think the issue is with newlines, you just can't paste this in irssi
You can always do this though: /exec -out cat content.txt

42wim commented

I'm going to close this as this seems a client issue.