Rosey / markdown-draft-js

A tool to convert content created in DraftJS to markdown and vice versa.
https://rosey.github.io/markdown-draft-js/
MIT License
318 stars 70 forks source link

Multiple inline styles not closed in the correct order #2

Closed Rosey closed 7 years ago

Rosey commented 7 years ago

Example of something that would fail:

bold text with italic inside that continues after bold doesn't

This should be rendered as:

**bold text _with italic inside_** _that continues after bold doesn't_

But instead is being rendered as

**bold text _with italic inside** that continues after bold doesn't_

I think we'll have to keep track of what inline "tags" are currently open and make sure we close/reopen nested children if a parent closes before the child is done.

Rosey commented 7 years ago

Should be fixed here: https://github.com/Rosey/markdown-draft-js/pull/3