Closed spantaleev closed 6 years ago
We apply the CSS class markdown-body
in messages with emoji (because we insert emoji with HTML). This class includes the rule white-space: normal;
.
With white-space: normal
, "Sequences of whitespace are collapsed..." including newline characters.
Using white-space: pre-wrap
(preserves \n
as <br>
) might be a solution (which is what .mx_MTextBody
defines) , but it would be worth:
white-space: normal
(perhaps something to do with wrapping? or overflowing?)Same seems to happen for Braille Patterns (U+2800-U+28FF) possibly more.
Will this see some fix/workaround in 0.14.x?
Seems like a pretty annoying regression to drag along.
I found the problem that caused this bug, will submit a pull request this evening.
See matrix-org/matrix-react-sdk#1910
@ZerataX The pull request also fixes the problem for braille characters
@lukebarnard1 I removed the class markdown-body
from emoji messages because it looked like it was accidentally added in matrix-org/matrix-react-sdk@4f4441fb07dcdfb831e4b54b9f8d7e611c172f29, so it shouldn't be a problem. Does that look good to you?
It does indeed, merged :smiley:
This seems to be a regression since
0.14.0
.The paragraphs in the following message get destroyed while rendering.
Original (as it appears in the message input box):
Resulting event:
Incorrectly renders as:
Workaround 1
Forcing Markdown-processing to trigger works around this problem.
The following message:
produces the following event, which renders correctly (paragraphs are preserved):
Workaround 2
If there's no emoji in the text, everything works well.
The following message:
produces the following event, which renders correctly (paragraphs are preserved):