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

Combination of blocks and `br` tags leads to more empty lines than in browser

Open KillyMXI opened this issue 2 years ago • 0 comments

Minimal HTML example

<div class="">Hello,</div>
<div class=""><br class="" /></div>
<div class="">my name is John Doe.</div>
<div class=""><br class="" /></div>
<div class=""><br class="" /></div>
<div class="">
  Best regards, John<br class="" />
  <div>

Options

{}

Observed output

Hello,


my name is John Doe.



Best regards, John

Expected output (as can be seen when opened in browser)

Hello,

my name is John Doe.


Best regards, John

Version information

  • html-to-text: 9.0.3
  • node: 14

Related:

  • [ ] #279
  • [ ] #232

KillyMXI avatar Jan 14 '23 16:01 KillyMXI