mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Change comment replacement character from " " (with trailing "\") to "." to avoid creating indented code blocks.
This commit is contained in:
parent
c4e236b858
commit
c7d2416f95
4 changed files with 45 additions and 36 deletions
|
@ -56,17 +56,17 @@ test("clearHtmlCommentTextValid", (t) => {
|
|||
"<!-->",
|
||||
"<!--->",
|
||||
"<!---->",
|
||||
"<!-- -->",
|
||||
" <!-- -->",
|
||||
" <!-- -->",
|
||||
"<!-- -->",
|
||||
"<!-- -->",
|
||||
"<!-- -->",
|
||||
"<!-- -->",
|
||||
"<!--.........-->",
|
||||
" <!--.........-->",
|
||||
" <!--.........-->",
|
||||
"<!--......-->",
|
||||
"<!--....-->",
|
||||
"<!--.-->",
|
||||
"<!--....-->",
|
||||
"<!---->",
|
||||
"<!-- -->",
|
||||
"<!-- -->",
|
||||
"<!-- -->",
|
||||
"<!--.....-->",
|
||||
"<!--.........-->",
|
||||
"<!--..-->",
|
||||
"<!--",
|
||||
"-->",
|
||||
"<!--",
|
||||
|
@ -78,21 +78,21 @@ test("clearHtmlCommentTextValid", (t) => {
|
|||
"-->",
|
||||
"<!--",
|
||||
"",
|
||||
" \\",
|
||||
"......",
|
||||
"",
|
||||
"-->",
|
||||
"<!-- \\",
|
||||
"<!--....",
|
||||
"",
|
||||
" -->",
|
||||
"text<!-- -->text",
|
||||
"....-->",
|
||||
"text<!--....-->text",
|
||||
"text<!--",
|
||||
"-->text",
|
||||
"text<!--",
|
||||
" \\",
|
||||
"....",
|
||||
"-->text",
|
||||
"<!-- --><!-- -->",
|
||||
"text<!-- -->text<!-- -->text",
|
||||
"text<!-- -->text",
|
||||
"<!--....--><!--....-->",
|
||||
"text<!--....-->text<!--....-->text",
|
||||
"text<!--..............-->text",
|
||||
"<!--",
|
||||
"text"
|
||||
];
|
||||
|
@ -133,9 +133,9 @@ test("clearHtmlCommentTextNonGreedy", (t) => {
|
|||
"<!----> -->"
|
||||
];
|
||||
const nonGreedyResult = [
|
||||
"<!-- --> -->",
|
||||
"<!-- --> -->",
|
||||
"<!-- --> -->",
|
||||
"<!--......--> -->",
|
||||
"<!--......--> -->",
|
||||
"<!--.--> -->",
|
||||
"<!----> -->"
|
||||
];
|
||||
const actual = helpers.clearHtmlCommentText(nonGreedyComments.join("\n"));
|
||||
|
@ -153,11 +153,11 @@ test("clearHtmlCommentTextEmbedded", (t) => {
|
|||
"text<!--text-->text"
|
||||
];
|
||||
const embeddedResult = [
|
||||
"text<!-- -->text",
|
||||
"text<!--....-->text",
|
||||
"<!-- markdownlint-disable MD010 -->",
|
||||
"text<!-- -->text",
|
||||
"text<!--....-->text",
|
||||
"text<!-- markdownlint-disable MD010 -->text",
|
||||
"text<!-- -->text"
|
||||
"text<!--....-->text"
|
||||
];
|
||||
const actual = helpers.clearHtmlCommentText(embeddedComments.join("\n"));
|
||||
const expected = embeddedResult.join("\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue