mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Synchronize regular expression for line breaks with markdown-it (fixes #117).
This commit is contained in:
parent
072da48add
commit
36dc946f46
2 changed files with 8 additions and 1 deletions
|
|
@ -3,7 +3,8 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// Regular expression for matching common newline characters
|
// 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)
|
// Regular expression for matching common front matter (YAML and TOML)
|
||||||
module.exports.frontMatterRe = /^(---|\+\+\+)$[^]*?^\1$(\r\n|\r|\n)/m;
|
module.exports.frontMatterRe = /^(---|\+\+\+)$[^]*?^\1$(\r\n|\r|\n)/m;
|
||||||
|
|
|
||||||
6
test/l-sep-as-line-break.md
Normal file
6
test/l-sep-as-line-break.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Heading
|
||||||
|
|
||||||
|
```text
|
||||||
|
hello
|
||||||
|
world
|
||||||
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue