[GH-ISSUE #136] Rule MD024 should be refined [to allow heading duplication for non-siblings] #1963

Closed
opened 2026-03-07 20:03:11 +03:00 by kerem · 4 comments
Owner

Originally created by @bfzhao on GitHub (Jul 17, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/136

It is reasonable to have rule MD024 to report any title conflict, but it makes sense only when those titles have the same parent title. Below case is very common and should not be reported as an issue:

# cast 1
## RCA
## RCA -----> should report here
## Action List 
# case 2
## RCA -----> should not report here
## Action List 
Originally created by @bfzhao on GitHub (Jul 17, 2018). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/136 It is reasonable to have rule MD024 to report any title conflict, but it makes sense only when those titles have the same parent title. Below case is very common and should not be reported as an issue: ``` # cast 1 ## RCA ## RCA -----> should report here ## Action List # case 2 ## RCA -----> should not report here ## Action List ```
kerem 2026-03-07 20:03:11 +03:00
Author
Owner

@DavidAnson commented on GitHub (Jul 17, 2018):

Although this conflicts with the rationale given in the rule description (https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md024---multiple-headings-with-the-same-content), it seems reasonable as an option.

<!-- gh-comment-id:405441671 --> @DavidAnson commented on GitHub (Jul 17, 2018): Although this conflicts with the rationale given in the rule description (https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md024---multiple-headings-with-the-same-content), it seems reasonable as an option.
Author
Owner

@DavidAnson commented on GitHub (Jul 17, 2018):

Here’s a corresponding issue/commit from the Ruby implementation:
https://github.com/markdownlint/markdownlint/issues/175

I prefer a parameter name like only_siblings and will probably support both for compatibility.

<!-- gh-comment-id:405641332 --> @DavidAnson commented on GitHub (Jul 17, 2018): Here’s a corresponding issue/commit from the Ruby implementation: https://github.com/markdownlint/markdownlint/issues/175 I prefer a parameter name like `only_siblings` and will probably support both for compatibility.
Author
Owner

@Coding-Rod commented on GitHub (Jul 27, 2023):

Add this to your setting.json if using vscode:

"markdownlint.config": {
        "MD024": false
}
<!-- gh-comment-id:1653894388 --> @Coding-Rod commented on GitHub (Jul 27, 2023): Add this to your setting.json if using vscode: ```json "markdownlint.config": { "MD024": false } ```
Author
Owner

@lveillard commented on GitHub (Nov 13, 2023):

I know it can be ignored, but this rule actually makes sense within the same scope. I think that this rule should be:
a) either enhanced to check only within scope
b) defaulted to false. And a new rule to check same-level conflicts only could be added

<!-- gh-comment-id:1808917630 --> @lveillard commented on GitHub (Nov 13, 2023): I know it can be ignored, but this rule actually makes sense within the same scope. I think that this rule should be: a) either enhanced to check only within scope b) defaulted to false. And a new rule to check same-level conflicts only could be added
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#1963
No description provided.