Rule MD024 should be refined [to allow heading duplication for non-siblings]
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
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.
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.
Add this to your setting.json if using vscode:
"markdownlint.config": {
"MD024": false
}
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