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

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