weaveworks / wordepress

Tool support enabling hosting of technical documentation in WordPress
Apache License 2.0
7 stars 4 forks source link

Remove line breaks from paragraphs when transforming markdown #7

Closed awh closed 8 years ago

awh commented 8 years ago

These are being converted embedded <br> tags, preventing the paragraph text from flowing correctly.

awh commented 8 years ago

This is an issue with the source documents, not the markdown converter:

https://github.com/russross/blackfriday/blob/master/inline.go#L157

We need to strip trailing spaces from all the markdown files.

awh commented 8 years ago

This is an issue with the source documents, not the markdown converter ... We need to strip trailing spaces from all the markdown files.

This isn't the issue - reopening.

awh commented 8 years ago

These are being converted embedded <br> tags

It's actually WordPress that's doing this, not our markdown converter. Unlike pandoc & jekyll, russross/blackfriday does not strip newlines from paragraphs - WordPress then handily converts them into hard line breaks in the HTML. I have implemented an extension option for converting newlines to spaces in paragraphs - will make it available in a fork and try to upstream it.