mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Add style option setext_with_atx_closed to header style rule MD003
Atx-style headers which are closed can now be used with setext style headers, when at header level 3 or more.
This commit is contained in:
parent
13ee2a285b
commit
32cd4feaea
4 changed files with 23 additions and 7 deletions
|
@ -197,9 +197,11 @@ module.exports = [
|
|||
style = styleForToken;
|
||||
}
|
||||
if ((styleForToken !== style) &&
|
||||
!((style === "setext_with_atx") &&
|
||||
!((style === "setext_with_atx" || style === "setext_with_atx_closed") &&
|
||||
(/h[12]/.test(token.tag) && (styleForToken === "setext")) ||
|
||||
(/h[^12]/.test(token.tag) && (styleForToken === "atx")))) {
|
||||
(/h[^12]/.test(token.tag) &&
|
||||
(styleForToken === "atx" || styleForToken === "atx_closed")))
|
||||
) {
|
||||
errors.push(token.lineNumber);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue