mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30:12 +01:00
Update newline handling to match latest CommonMark specification.
This commit is contained in:
parent
65f6d38978
commit
220a1d78a9
3 changed files with 3 additions and 17 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// Regular expression for matching common newline characters
|
// Regular expression for matching common newline characters
|
||||||
// See NEWLINES_RE in markdown-it/lib/rules_core/normalize.js
|
// See NEWLINES_RE in markdown-it/lib/rules_core/normalize.js
|
||||||
const newLineRe = /\r[\n\u0085]?|[\n\u2424\u2028\u0085]/;
|
const newLineRe = /\r\n?|\n/;
|
||||||
module.exports.newLineRe = newLineRe;
|
module.exports.newLineRe = newLineRe;
|
||||||
|
|
||||||
// Regular expression for matching common front matter (YAML and TOML)
|
// Regular expression for matching common front matter (YAML and TOML)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
# Heading
|
|
||||||
|
|
||||||
```text
|
|
||||||
hello
|
|
||||||
world
|
|
||||||
```
|
|
||||||
|
|
@ -714,11 +714,7 @@ module.exports.stringInputLineEndings = function stringInputLineEndings(test) {
|
||||||
"cr": "One\rTwo\r#Three\n",
|
"cr": "One\rTwo\r#Three\n",
|
||||||
"lf": "One\nTwo\n#Three\n",
|
"lf": "One\nTwo\n#Three\n",
|
||||||
"crlf": "One\r\nTwo\r\n#Three\n",
|
"crlf": "One\r\nTwo\r\n#Three\n",
|
||||||
"mixed": "One\rTwo\n#Three\n",
|
"mixed": "One\rTwo\n#Three\n"
|
||||||
"crnel": "One\r\u0085Two\r\u0085#Three\n",
|
|
||||||
"snl": "One\u2424Two\u2424#Three\n",
|
|
||||||
"lsep": "One\u2028Two\u2028#Three\n",
|
|
||||||
"nel": "One\u0085Two\u0085#Three\n"
|
|
||||||
},
|
},
|
||||||
"config": defaultConfig,
|
"config": defaultConfig,
|
||||||
"resultVersion": 0
|
"resultVersion": 0
|
||||||
|
|
@ -729,11 +725,7 @@ module.exports.stringInputLineEndings = function stringInputLineEndings(test) {
|
||||||
"cr": { "MD018": [ 3 ] },
|
"cr": { "MD018": [ 3 ] },
|
||||||
"lf": { "MD018": [ 3 ] },
|
"lf": { "MD018": [ 3 ] },
|
||||||
"crlf": { "MD018": [ 3 ] },
|
"crlf": { "MD018": [ 3 ] },
|
||||||
"mixed": { "MD018": [ 3 ] },
|
"mixed": { "MD018": [ 3 ] }
|
||||||
"crnel": { "MD018": [ 3 ] },
|
|
||||||
"snl": { "MD018": [ 3 ] },
|
|
||||||
"lsep": { "MD018": [ 3 ] },
|
|
||||||
"nel": { "MD018": [ 3 ] }
|
|
||||||
};
|
};
|
||||||
test.deepEqual(actualResult, expectedResult, "Undetected issues.");
|
test.deepEqual(actualResult, expectedResult, "Undetected issues.");
|
||||||
test.done();
|
test.done();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue