jonschlinkert / remarkable

Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.
https://jonschlinkert.github.io/remarkable/demo/
MIT License
5.75k stars 373 forks source link

Add option emptyLines #396

Open zentby opened 4 years ago

zentby commented 4 years ago

Solves #242

It introduces a new option emptyLines for default and full version.

When it is enabled, it will preserve the empty lines and convert them into <p></p>.

e.g. Markdown

line1

line2

Before:

<p>line1</p>
<p>line2</p>

After:

<p>line1</p>
<p></p>
<p>line2</p>

Note there will be an empty line not being preserved, to be compatible for existing line terminator.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.02%) to 98.569% when pulling fcc4a2f7fdf39d221d44ca50fabd84aa50f8f14d on zentby:empty_lines into 58b6945f203ca7a0bb5a0785df90a3a6a8b9e59c on jonschlinkert:master.

Dagur commented 1 year ago

A copule of comments: