[GH-ISSUE #433] First long header is not recognized as an error #2209

Closed
opened 2026-03-07 20:05:34 +03:00 by kerem · 1 comment
Owner

Originally created by @EmilyGraceSeville7cf on GitHub (Sep 28, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/433

Hello! I have README file and the following .yml config:

# MD010/no-hard-tabs - Hard tabs
MD010:
  # Number of spaces for each hard tab
  spaces_per_tab: 2

# MD013/line-length - Line length
MD013:
  # Number of characters
  line_length: 200
  # Number of characters for headings
  heading_line_length: 10
  # Number of characters for code blocks
  code_block_line_length: 80

# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
MD024:
  # Only check sibling headings
  siblings_only: true

# MD026/no-trailing-punctuation - Trailing punctuation in heading
MD026:
  # Punctuation characters
  punctuation: ".,;:!?"

# MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading
MD036:
  # Punctuation characters
  punctuation: ".,;:!?"

# MD043/required-headings/required-headers - Required heading structure
MD043:
  # List of headings
  headings:
    - "+"
    - "## Description"
    - "+"
    - "## Syntax"
    - "## Return codes"
    - "*"

I don't understand why there is no linter error for ## Requirenments heading about long length exceeding 10 chars.

Originally created by @EmilyGraceSeville7cf on GitHub (Sep 28, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/433 Hello! I have [README](https://github.com/Console-Utils/awk-gendocs-util/tree/ci#readme) file and the following .yml config: ```yml # MD010/no-hard-tabs - Hard tabs MD010: # Number of spaces for each hard tab spaces_per_tab: 2 # MD013/line-length - Line length MD013: # Number of characters line_length: 200 # Number of characters for headings heading_line_length: 10 # Number of characters for code blocks code_block_line_length: 80 # MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content MD024: # Only check sibling headings siblings_only: true # MD026/no-trailing-punctuation - Trailing punctuation in heading MD026: # Punctuation characters punctuation: ".,;:!?" # MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading MD036: # Punctuation characters punctuation: ".,;:!?" # MD043/required-headings/required-headers - Required heading structure MD043: # List of headings headings: - "+" - "## Description" - "+" - "## Syntax" - "## Return codes" - "*" ``` I don't understand why there is no linter error for `## Requirenments` heading about long length exceeding 10 chars.
kerem 2026-03-07 20:05:34 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Sep 28, 2021):

The default behavior of MD013 will not report a violation if there are no spaces beyond the configured limit. In other words, if there's not an easy change to make the line shorter, it allows the line through. If you want to be strict about the length limit, the "strict" option should do what you want. You may also be interested in the "stern" option, though it wouldn't help in this particular case. The rule documentation has more about this and examples: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md013

<!-- gh-comment-id:929361708 --> @DavidAnson commented on GitHub (Sep 28, 2021): The default behavior of MD013 will not report a violation if there are no spaces beyond the configured limit. In other words, if there's not an easy change to make the line shorter, it allows the line through. If you want to be strict about the length limit, the "strict" option should do what you want. You may also be interested in the "stern" option, though it wouldn't help in this particular case. The rule documentation has more about this and examples: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md013
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#2209
No description provided.