Line breaks issue
www-r3m1x opened this issue · 4 comments
In the following HTML example:
<p>First line</p><p>Second line</p><br/><p>One empty line above</p><br/><br/><p>2 empty lines above</p>
should render with a line break after the 'Second line' and before the 'One empty line above' and with two line breaks after the 'One empty line above' and before the '2 empty lines above' is rendered. However, I've noticed when the HTML string is parsed, line breaks are stripped out, so the render ends up like this:
instead of this:
Looks like a bug because in version 1.7.0 there was a line break after the 'Second line' and before the 'One empty line above'. But after the 'One empty line above' and before the '2 empty lines above' was only one line break instead of two.
Thank you for your feedback.
I hadn't considered the context that appears between <xx>
before.
It has been fixed in version 1.8.1
, and if there are any other issues with line breaks, please report them back to us, thank you.
Currently, we will implement it according to the browser's logic for line breaks. Here are some of the browser line break logics I have listed:
<p></p>
->/n
<div><p>
... ->/n
...<br/></p>
->/n
...<br/><br/></p>
->/n/n
</p><br/><p>
->/n/n
--
ref: #40
The pod version has been released.
Hello @zhgchgli0718
As I can see
<p></p> -> /n
it's not fully correct logic
As you can see, <p></p>
adds some spacing before and after string
In fact, it is not \n, but the margin/padding of a label.
Hello @zhgchgli0718 As I can see
As you can see, `` adds some spacing before and after string<p></p> -> /n
it's not fully correct logic