[GH-ISSUE #52] Erroneous MD003 warning #43

Closed
opened 2026-03-03 01:23:16 +03:00 by kerem · 3 comments
Owner

Originally created by @zafields on GitHub (Mar 22, 2017).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/52

MD003/header-style: Header style [Expected: setext; Actual: atx]

I get this warning for ### Header Level 3, even though your documentation says it is valid...

The setext_with_atx and settext_with_atx_closed doc styles allow atx-style headers of level 3 or more in documents with setext style headers:

Originally created by @zafields on GitHub (Mar 22, 2017). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/52 `MD003/header-style: Header style [Expected: setext; Actual: atx]` I get this warning for `### Header Level 3`, even though your documentation says it is valid... > The setext_with_atx and settext_with_atx_closed doc styles allow atx-style headers of level 3 or more in documents with setext style headers:
kerem 2026-03-03 01:23:16 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Mar 22, 2017):

Can you please provide a small bit of Markdown that demonstrates the problem?

<!-- gh-comment-id:288525425 --> @DavidAnson commented on GitHub (Mar 22, 2017): Can you please provide a small bit of Markdown that demonstrates the problem?
Author
Owner

@DavidAnson commented on GitHub (Mar 23, 2017):

I have an idea for what's going on. By default, the style for MD003 is consistent which means the rule looks at the first header in the file and expects everything else to match that. If you want the settext_with_atx_closed setting to be used, you have to explicitly set it in config.

For example:

{
  "MD003": {
    "style": "setext_with_atx_closed"
  }
}

References:

<!-- gh-comment-id:288618855 --> @DavidAnson commented on GitHub (Mar 23, 2017): I have an idea for what's going on. By default, the `style` for `MD003` is `consistent` which means the rule looks at the first header in the file and expects everything else to match that. If you want the `settext_with_atx_closed` setting to be used, you have to explicitly set it in config. For example: ```json { "MD003": { "style": "setext_with_atx_closed" } } ``` References: - https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md003---header-style - https://github.com/DavidAnson/markdownlint#configuration
Author
Owner

@DavidAnson commented on GitHub (Mar 28, 2017):

Please let me know if the above does not resolve your issue.

<!-- gh-comment-id:289670186 --> @DavidAnson commented on GitHub (Mar 28, 2017): Please let me know if the above does not resolve your issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#43
No description provided.