draft-convert icon indicating copy to clipboard operation
draft-convert copied to clipboard

Increase visual accuracy of convertFromHTML flat mode

Open benbriggs opened this issue 7 years ago • 0 comments

Fixes https://github.com/HubSpot/draft-convert/issues/113

Adds two fixes to flat: true mode of convertToHTML:

  1. If in flat mode within a block starting with text as a direct child and a sibling element to that text is identified as a block, add a block divider of its type.
  2. If a non-empty block has a <br> tag as a last child, don't add the closing block separator to the chunk.

benbriggs avatar May 08 '18 22:05 benbriggs