mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Handle un-closed HTML comments in a way that does not trigger MD047/single-trailing-newline (fixes #187).
This commit is contained in:
parent
0b9b74ccfd
commit
61c92e5997
4 changed files with 9 additions and 2 deletions
|
@ -76,7 +76,7 @@ module.exports.clearHtmlCommentText = function clearHtmlCommentText(text) {
|
|||
let j = text.indexOf(htmlCommentEnd, i);
|
||||
if (j === -1) {
|
||||
j = text.length;
|
||||
text += "\\";
|
||||
text += "\\\n";
|
||||
}
|
||||
const comment = text.slice(i + htmlCommentBegin.length, j);
|
||||
if ((comment.length > 0) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue