-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown doesn't support italic in the middle of words #179
Comments
OK. I'd be open to a PR to use asterisk, but it's a breaking change so perhaps only do it when necessary to disambiguate an italic within a word. Other ideas to minimize breakage? |
Yeah it probably needs to be considered as a breaking change if someone trusts the plugin to generate underscores, but I doubt it will cause much breakage. Markdown should consider the asterisk and the underscore nearly identical, and the import plugin will work fine with both. |
Just stumbled over this, any progress on this? Would you accept a PR changing the italic from underscore to asterisk in the draft-js-export-markdown ? |
Yea, totally hit me with a PR. Would be happy to review! [Edit] Both underscore and italics should work for italic in Markdown. If in doubt, do check how GH does it and let's try to mimic that behavior. |
Any update on this? I'm having the same issue. |
We decided to fork the repository and apply the fix in this pr manually #182 I never got any comments on PR so I never tried to fix the tests or tried to finalize it. |
Currently it is impossible to use italic in the middle of words, because the import plugin will render underscores in the middle of words as underscores instead of turning them into italic (As it should, see commonmark specs and github specs).
For example exporting "testitalicword" and then importing it back would result in
test_italic_word
.Possible fix
I tried fixing it by changing the italic from underscore to asterisk inthe draft-js-export-markdown plugin and for me it seemed to fix the issue.
In source
The text was updated successfully, but these errors were encountered: