node-html-parser icon indicating copy to clipboard operation
node-html-parser copied to clipboard

structuredText with blank lines

Open woellij opened this issue 3 years ago • 1 comments

Hi,

thanks for supporting this library.

I've stumbled upon an issue with structured text, where blank lines from html are ommitted in the structuredText. Is there a way around that?

For example a element with that structure:

 b
    #text
    br
    br
    #text
    br
    br

results in only line-breaked text, but no blank lines.

Thanks for your response in advance.

woellij avatar Mar 29 '22 10:03 woellij

Would this help you?

html.replace(/\n/g, '');

taoqf avatar May 31 '22 05:05 taoqf