sstur / draft-js-export-markdown

DraftJS: Export ContentState to Markdown
http://npm.im/draft-js-export-markdown
55 stars 23 forks source link

Fix extra line break #5

Closed jxodwyer closed 8 years ago

jxodwyer commented 8 years ago

@sstur please let me know your thoughts on this. It seems as though the line break in insertLineBreaks() wasn't working because of some weirdness on line breaks in markdown: http://meta.stackexchange.com/questions/40976/what-is-the-reason-for-the-top-secret-two-space-newline-markdown-weirdness

I also removed the extra line breaks across all formatting scenarios but maybe we would only want this for the default case. Thanks

sstur commented 8 years ago

This change will break a bunch of tests (I should have travis-ci on this repo to run tests automatically).

I've written a better explanation on #4 about why this linebreak behavior is not a bug. However this diff does bring up an interesting possibility about converting soft-breaks to markdown. I'll look into that.