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 69 forks source link

Unnecessary hash symbol escape #61

Closed igorlesnenko closed 6 years ago

igorlesnenko commented 6 years ago

#hashtag is not considered as heading in markdown, as there is no space after #. We should not escape it like this: \#hashtag, when converting from DraftJS to markdown.

https://spec.commonmark.org/0.28/#example-34

Rosey commented 6 years ago

Thanks! I'll try to get to this but adding help wanted tag in case someone else is interested in fixing before I do :)

Rosey commented 6 years ago

I've merged a fix for this, will get out a release shortly!

igorlesnenko commented 6 years ago

@Rosey I see the issue still exists in 1.1.1

igorlesnenko commented 6 years ago

@Rosey If the line starts from the #hashtag it got escaped - which is incorrect.

If word #hashtag it is working fine - no escape.

Rosey commented 6 years ago

argh, just looking

Rosey commented 6 years ago

Ugh, >Test <-- this needs to be escaped, #Test <- this does not. Thank you markdown.

Rosey commented 6 years ago

https://github.com/Rosey/markdown-draft-js/pull/72