[GH-ISSUE #364] Regarding MD026 No Trailing Punctuation #2153

Closed
opened 2026-03-07 20:05:04 +03:00 by kerem · 5 comments
Owner

Originally created by @jamesmrollins on GitHub (Jan 6, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/364

Hi @DavidAnson
I am attempting to follow code directions to allow exclamation points in headings. According to what I read, the code snippet in the markdownlint.json, shown below, should screen for periods, commas, semicolons and colons only:

"MD026": { "level" : ".,;:" }

image

When I run the linter it still calls out the exclamation points as an error.

Thank you in advance,
James

Originally created by @jamesmrollins on GitHub (Jan 6, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/364 Hi @DavidAnson I am attempting to follow code directions to allow exclamation points in headings. According to what I read, the code snippet in the markdownlint.json, shown below, should screen for periods, commas, semicolons and colons only: "MD026": { "level" : ".,;:" } ![image](https://user-images.githubusercontent.com/30132017/103811276-87539500-5011-11eb-9f6a-0b14d50f657b.png) When I run the linter it still calls out the exclamation points as an error. Thank you in advance, James
kerem 2026-03-07 20:05:04 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Jan 6, 2021):

The parameter name is punctuation, not level.

https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md026

<!-- gh-comment-id:755561991 --> @DavidAnson commented on GitHub (Jan 6, 2021): The parameter name is `punctuation`, not `level`. https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md026
Author
Owner

@waldyrious commented on GitHub (Jan 7, 2021):

This issue is similar to #276, which requested to allow ? in headings. I can see a similar reason to allow ! as well — I've seen e.g. FAQ documents that add exclamations alongside questions, and can also think of a step-by-step guide whose last section could be something like "That's it!", etc.

By this reasoning, the final period should also be allowed. Alternatively, these end-of-sentence punctuation marks (., ! and ?, and their fullwidth variants) could be bundled into a possible configuration of the no-trailing-punctuation rule.

<!-- gh-comment-id:756037260 --> @waldyrious commented on GitHub (Jan 7, 2021): This issue is similar to #276, which requested to allow `?` in headings. I can see a similar reason to allow `!` as well — I've seen e.g. FAQ documents that add exclamations alongside questions, and can also think of a step-by-step guide whose last section could be something like "That's it!", etc. By this reasoning, the final period should also be allowed. Alternatively, these end-of-sentence punctuation marks (`.`, `!` and `?`, and their fullwidth variants) could be bundled into a possible configuration of the `no-trailing-punctuation` rule.
Author
Owner

@DavidAnson commented on GitHub (Jan 7, 2021):

@waldyrious The issue here was misconfiguration and I'll close it if resolved. Regarding other punctuation, there will always be exceptions. This rule can be disabled or customized when needed. The only feedback that seemed consistent was question mark.

<!-- gh-comment-id:756231608 --> @DavidAnson commented on GitHub (Jan 7, 2021): @waldyrious The issue here was misconfiguration and I'll close it if resolved. Regarding other punctuation, there will always be exceptions. This rule can be disabled or customized when needed. The only feedback that seemed consistent was question mark.
Author
Owner

@DavidAnson commented on GitHub (Jan 7, 2021):

MD026 looks to be used about 87% of the time, so I'm not ready to remove or disable it just yet.

https://dlaa.me/blog/post/markdownlintanalyzeconfig

<!-- gh-comment-id:756237989 --> @DavidAnson commented on GitHub (Jan 7, 2021): MD026 looks to be used about 87% of the time, so I'm not ready to remove or disable it just yet. https://dlaa.me/blog/post/markdownlintanalyzeconfig
Author
Owner

@jamesmrollins commented on GitHub (Jan 7, 2021):

@DavidAnson - Yes, this issue was resolved by using the correct parameter. Thank you for the very prompt assistance. James

<!-- gh-comment-id:756238044 --> @jamesmrollins commented on GitHub (Jan 7, 2021): @DavidAnson - Yes, this issue was resolved by using the correct parameter. Thank you for the very prompt assistance. James
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#2153
No description provided.