[GH-ISSUE #174] no-trailing-punctionation rule being ignored #1999

Closed
opened 2026-03-07 20:03:33 +03:00 by kerem · 3 comments
Owner

Originally created by @yankeeinlondon on GitHub (Mar 23, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/174

in my .markdownlint.yaml file (in repo root) I have several rules (see below) which all work but I wanted to modify no-trailing-punctuation to allow both "!" and "?"

no-duplicate-header: false
line-length: false
no-inline-html: false
no-space-in-links: false
no-trailing-punctuation: ".,;:"

But as many combinations as I try I can't get this configuration adjustment to take hold. Also of note, I am using the vs-code environment to surface these warnings and so therefore possibly this is actually an error with the markdownlint extension by David Anson. I will raise this issue there too as I'm really not sure how to distinguish between the two.

Originally created by @yankeeinlondon on GitHub (Mar 23, 2019). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/174 in my `.markdownlint.yaml` file (in repo root) I have several rules (see below) which all work but I wanted to modify `no-trailing-punctuation` to allow both "!" and "?" ```yaml no-duplicate-header: false line-length: false no-inline-html: false no-space-in-links: false no-trailing-punctuation: ".,;:" ``` But as many combinations as I try I can't get this configuration adjustment to take hold. Also of note, I am using the `vs-code` environment to surface these warnings and so therefore possibly this is actually an error with the [`markdownlint` extension by David Anson](https://github.com/DavidAnson/vscode-markdownlint). I will raise this issue there too as I'm really not sure how to distinguish between the two.
kerem 2026-03-07 20:03:33 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

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

punctuation is a parameter to the rule, as seen here in JSON: github.com/DavidAnson/markdownlint@2710c375b3/test/heading_trailing_punctuation_customized.json

You need to set it as a parameter in YAML as seen here for indent: https://github.com/DavidAnson/markdownlint/blob/master/test/config/config-grandparent.yaml

If that’s not clear, I can give a better example when I’m not on my phone.

<!-- gh-comment-id:475912799 --> @DavidAnson commented on GitHub (Mar 23, 2019): `punctuation` is a parameter to the rule, as seen here in JSON: https://github.com/DavidAnson/markdownlint/blob/2710c375b3c9b9b6531d546b667f50f7d0c956f2/test/heading_trailing_punctuation_customized.json You need to set it as a parameter in YAML as seen here for `indent`: https://github.com/DavidAnson/markdownlint/blob/master/test/config/config-grandparent.yaml If that’s not clear, I can give a better example when I’m not on my phone.
Author
Owner

@yankeeinlondon commented on GitHub (Mar 23, 2019):

Many thanks @DavidAnson, that is clear. So for others who may end up here, in YAML I would configure this rule as:

no-duplicate-header: false
line-length: false
no-inline-html: false
no-space-in-links: false
no-trailing-punctuation:
  punctuation: ".,;:"
<!-- gh-comment-id:475912977 --> @yankeeinlondon commented on GitHub (Mar 23, 2019): Many thanks @DavidAnson, that is clear. So for others who may end up here, in YAML I would configure this rule as: ```yml no-duplicate-header: false line-length: false no-inline-html: false no-space-in-links: false no-trailing-punctuation: punctuation: ".,;:" ```
Author
Owner

@DavidAnson commented on GitHub (Mar 25, 2019):

Yep!

<!-- gh-comment-id:476054188 --> @DavidAnson commented on GitHub (Mar 25, 2019): Yep!
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#1999
No description provided.