mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update definition of helpers.isBlankLine to treat unterminated start/end comments as potentially blank lines (fixes #431).
This commit is contained in:
parent
1b23976aa2
commit
6dea67825a
4 changed files with 67 additions and 11 deletions
|
@ -226,7 +226,7 @@ bar`
|
|||
});
|
||||
|
||||
test("isBlankLine", (t) => {
|
||||
t.plan(25);
|
||||
t.plan(29);
|
||||
const blankLines = [
|
||||
null,
|
||||
"",
|
||||
|
@ -244,7 +244,11 @@ test("isBlankLine", (t) => {
|
|||
"> ",
|
||||
"> > > \t",
|
||||
"> <!--text-->",
|
||||
">><!--text-->"
|
||||
">><!--text-->",
|
||||
"<!--",
|
||||
" <!-- text",
|
||||
"text --> ",
|
||||
"-->"
|
||||
];
|
||||
blankLines.forEach((line) => t.true(helpers.isBlankLine(line), line || ""));
|
||||
const nonBlankLines = [
|
||||
|
@ -253,9 +257,9 @@ test("isBlankLine", (t) => {
|
|||
".",
|
||||
"> .",
|
||||
"<!--text--> text",
|
||||
"<!--->",
|
||||
"<!--",
|
||||
"-->"
|
||||
"text <!--text-->",
|
||||
"text <!--",
|
||||
"--> text"
|
||||
];
|
||||
nonBlankLines.forEach((line) => t.true(!helpers.isBlankLine(line), line));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue