Closed michael-buschbeck closed 3 years ago
This leaves the question how to specify a line break in a chat message.
It would have to be something that isn't stripped by Roll20 before the message even gets to MMM, i.e. it can't be HTML <br>
.
Observation: Especially with "!mmm combine chat" existing, it seems unlikely it'll be necessary to add line breaks anywhere else than at the end of a "!mmm chat: ..." command. Maybe parametrize "chat:" somehow to say "...with a line break between this and the next chat: segment".
...or Markdown-style – just leave an empty chat line where you want your line break:
Line | Command |
---|---|
1 | !mmm combine chat |
2 | !mmm chat: first paragraph |
3 | !mmm chat: |
4 | !mmm chat: second paragraph |
5 | !mmm end combine |
produces:
Finn: first paragraph
second paragraph
(That would have to be a line that's syntactically empty, not one that just happens to produce no output.)
For what it's worth, if you sneak a <br>
past Roll20's chat line parser, you can already do that now:
Line | Command |
---|---|
1 | !mmm chat: first paragraph${"<"}br>second paragraph |
No, not winning any beauty contests with that one.
Slightly more polished:
Line | Command |
---|---|
1 | !mmm script |
2 | !mmm set BR = "<" & "br>" |
3 | !mmm chat: first paragraph${BR}second paragraph${BR}third paragraph |
4 | !mmm end script |
Heh, I just realized that this is truly a backwards-compatible change since chat: without anything behind it is currently a syntax error. Yay!
I've also realized that only <br/>
makes actual sense as the result of an empty chat: line – not \n
because that just splits the line into several chat messages (and there's an easier way to achieve that already).
Support adding line breaks to chat messages. (Roll20's API supports
<br>
insendChat()
messages.)