Update MD035/hr-style to correctly match thematic breaks in block quotes.

This commit is contained in:
David Anson 2021-12-14 23:05:03 -08:00
parent 517eb42015
commit 8fde53cf31
9 changed files with 130 additions and 16 deletions

View file

@ -10,12 +10,12 @@ module.exports = {
"tags": [ "hr" ],
"function": function MD035(params, onError) {
let style = String(params.config.style || "consistent");
filterTokens(params, "hr", function forToken(token) {
const lineTrim = token.line.trim();
filterTokens(params, "hr", (token) => {
const { lineNumber, markup } = token;
if (style === "consistent") {
style = lineTrim;
style = markup;
}
addErrorDetailIf(onError, token.lineNumber, style, lineTrim);
addErrorDetailIf(onError, lineNumber, style, markup);
});
}
};