42wim / matterircd

Connect to your mattermost or slack using your IRC-client of choice.
MIT License
294 stars 60 forks source link

please support mattermost code blocks #303

Closed jdstrand closed 4 years ago

jdstrand commented 4 years ago

https://github.com/42wim/matterircd/issues/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 https://github.com/42wim/matterircd/issues/201#issuecomment-435580635, 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.

guilhermepiccoli commented 4 years ago

+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 4 years ago

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 4 years ago

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