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

Generating unnecessary tags for nested inline style

Open zhyupe opened this issue 8 years ago • 2 comments

This happens given the following input:

aaabbbaaa

The excepted output is

<p><em>aaa<strong>bbb</strong>aaa</em></p>

Actual output:

<p><em>aaa</em><strong><em>bbb</em></strong><em>aaa</em></p>

zhyupe avatar May 12 '17 03:05 zhyupe

@zhyupe : the algorithm parses html not as tree / nested structure but rather as flat structure and it results in flat inline style tags. I do not plan to change that, I will have to come up with new algo for tree traversal for that 😞

jpuri avatar Jul 22 '17 10:07 jpuri

@jpuri any update on this?

henperi avatar May 17 '21 15:05 henperi