html-text icon indicating copy to clipboard operation
html-text copied to clipboard

Blank lines created by <br> cannot be parsed correctly

Open luyuhuang opened this issue 4 years ago • 3 comments

Hi all,

When I try to convert the following html to plain text:

<div>aaa</div>
<br>
<div>bbb</div>

the output is

aaa
bbb

but I think there should be a blank line between aaa and bbb. I try to read the code and found that the blank line created by <br> is ignored because of context.prev is _NEWLINE(created by the previous <div>). Is there a way to solve this problem? Thank you very much.

luyuhuang avatar Dec 28 '19 08:12 luyuhuang