mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Handle files with front matter only and no trailing newline (fixes #157).
This commit is contained in:
parent
7d6635b472
commit
0bb38faa21
3 changed files with 8 additions and 1 deletions
|
|
@ -7,7 +7,7 @@
|
|||
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;
|
||||
module.exports.frontMatterRe = /^(---|\+\+\+)$[^]*?^\1$(\r\n|\r|\n|$)/m;
|
||||
|
||||
// Regular expression for matching inline disable/enable comments
|
||||
const inlineCommentRe =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue