mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30:12 +01:00
Update MD035/hr-style to correctly match thematic breaks in block quotes.
This commit is contained in:
parent
517eb42015
commit
8fde53cf31
9 changed files with 130 additions and 16 deletions
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue