Synchronize regular expression for line breaks with markdown-it (fixes #117).

This commit is contained in:
David Anson 2018-04-29 22:29:03 -07:00
parent 072da48add
commit 36dc946f46
2 changed files with 8 additions and 1 deletions

View file

@ -3,7 +3,8 @@
"use strict";
// Regular expression for matching common newline characters
module.exports.newLineRe = /\r\n|\r|\n/;
// See NEWLINES_RE in markdown-it/lib/rules_core/normalize.js
module.exports.newLineRe = /\r[\n\u0085]?|[\n\u2424\u2028\u0085]/;
// Regular expression for matching common front matter (YAML and TOML)
module.exports.frontMatterRe = /^(---|\+\+\+)$[^]*?^\1$(\r\n|\r|\n)/m;

View file

@ -0,0 +1,6 @@
# Heading
```text
hello
world
```