Closed williamkray closed 2 years ago
hilariously, even my sample code i pasted above stripped out the extra spaces between the words in this is text
. so just imagine lots of extra spaces added between all three words.
here's the raw markdown format of what i had entered above:
Describe the bug
HTML has historically stripped excessive whitespace from text, depending instead on things like
<p>
,<br />
, etc to format beyond single spaces between words.Bots written in white-space specific code like Python often need to use whitespace for formatting so that the code runs properly, and will often depend on the fact that sending a message in matrix as HTML will remove the excess spacing to return nicely formatted message content.
Cinny appears to be including the whitespace in the HTML rendered messages, resulting in disjointed and oddly formatted messages. For example, a stock ticker bot I run includes the following code to format the message:
The message content is broken up across multiple lines to adhere to common readability standards by escaping the newline with a
\
and indenting the continuation. In element, this still results in a message formatted as expected:But Cinny renders the extra spaces and results in an oddly formatted message:
Reproduction
/html <p>this is text</p>
this is text
in elementthis is text
Expected behavior
Cinny should render the message as
this is text
Platform and versions
Additional context
No response