-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Milestone
Description
In Markdown paragraphs may contain hard breaks. To indicate a hard break, a line within a paragraph (but not the last one), may be suffixed with at least two spaces:
https://spec.commonmark.org/0.29/#hard-line-break
This is done to prevent Markdown parsers from interpreting every line break as a hard break. Line breaks are often used in source Markdown documents to keep the maximum line length under a certain bound.
CodiMD seems to parse any line break as a hard break. This is probably a bug.
Versions affected
This happens in 65d8fd2 (May 1, 2019).
Examples
No hard breaks
This Markdown (spaces replaced with ␣
for display):
Asperiores␣in␣vitae␣quo␣ratione␣
omnis␣dolorem␣doloribus␣voluptatum.
Dicta␣laborum␣quasi␣aut␣vel␣est.
Should generate this HTML:
<p>Asperiores in vitae quo ratione
omnis dolorem doloribus voluptatum.
Dicta laborum quasi aut vel est.</p>
CodiMD however, generates:
<p>Asperiores in vitae quo ratione<br/>
omnis dolorem doloribus voluptatum.<br/>
Dicta laborum quasi aut vel est.</p>
Hard breaks
This Markdown (spaces shown as ␣
):
Snow␣in␣my␣shoe␣␣
Abandoned␣␣
Sparrow's␣nest␣␣
Should render as:
<p>Snow in my shoe<br/>
Abandoned<br/>
Sparrow's nest</p>