From dc4acff0679e3ab32eb0402164ee20648a625939 Mon Sep 17 00:00:00 2001 From: David Anson Date: Fri, 26 May 2023 20:58:59 -0700 Subject: [PATCH] Update MD044/proper-names to ignore the content of HTML comments when its html_elements parameter is false (fixes #832). --- demo/markdownlint-browser.js | 2 +- lib/md044.js | 4 +- test/proper-names-no-html.md | 6 ++ test/proper-names.md | 6 ++ .../markdownlint-test-scenarios.js.md | 52 ++++++++++++++++++ .../markdownlint-test-scenarios.js.snap | Bin 193307 -> 193520 bytes 6 files changed, 68 insertions(+), 2 deletions(-) diff --git a/demo/markdownlint-browser.js b/demo/markdownlint-browser.js index 941c17cf..53aad198 100644 --- a/demo/markdownlint-browser.js +++ b/demo/markdownlint-browser.js @@ -5794,7 +5794,7 @@ module.exports = { }, function (token) { var children = token.children; if (!includeHtmlElements && token.type === "htmlFlow") { - children = children.slice(1, -1); + children = children[0] && children[0].text === " + + + + + + ␊ + ␊ + ␊ + ␊ ␊ + ␊ + ␊ + ␊