Closed bradbirnbaum closed 7 years ago
Hi! Thanks for logging this as an issue 😄
I've written a test to highlight the bug, but I can't immediately think of a clean way to fix it. Going by how the markdown editor works in GitHub, I imagine the desired effect should be that any leading and trailing spaces around the word should be moved outside the markdown characters, so e.g. some __ bold __ text
becomes some __bold__ text
etc.
Thanks @kadikraman for fixing the issue. Big help!
If you are using draft-js and enable bold, then type a space, then your text and then another space before ending your block block you will get markdown that looks like this:
this is my text __ this is my bold text __ end of text
However since there is a space between the __ and the first char its not legal and won't render correctly.