soasme / nim-markdown

A Beautiful Markdown Parser in the Nim World.

Home Page:https://www.soasme.com/nim-markdown/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support extension `escaped_line_breaks`

timotheecour opened this issue · comments

full context: https://github.com/nim-lang/Nim/issues/9291#issuecomment-432351178
it's useful for editors that automatically trim trailing spaces

commented

Will support it in the next version.

commented

v0.3.4 released. Nim-markdown now supports hard line breaks by both \ and trailing whitespaces.

test "inline break":
  check markdown("hello\nworld") == "<p>hello\nworld</p>"
  check markdown("hello\\\nworld") == "<p>hello<br />\nworld</p>"
  check markdown("hello  \nworld") == "<p>hello<br />\nworld</p>"