markdown2confluence
markdown2confluence copied to clipboard
Single newlines are passed through, are interpreted as hard newlines by Confluence
In markdown, you can use newlines to do manual word wrapping (handy with M-q in emacs) and it does not consider them a new paragraph. Ie., Markdown considers double-newlines to be paragraph delimiters. See http://daringfireball.net/projects/markdown/syntax#p.
However, Confluence interprets single newlines into <br>s and markdown2confluence passes them right through, meaning that your paragraphs display in Confluence peppered with <br>s.
Instead, markdown2confluence It should strip out single newlines.
Note that __\n (double space followed by new-line) should result in <br>.
Proposed parsing:
- Split by
\s*\n\s*\n\s*; get back a list of paragraphs. - Split by
\s\s+\n\s*; get back a list of explicitly broken lines.
This ignores all other syntactic features, in particular code blocks.