DavidAnson / vscode-markdownlint

Markdown linting and style checking for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
MIT License
893 stars 166 forks source link

Issue with multiple heading with same content #346

Open mayankj007 opened 2 weeks ago

mayankj007 commented 2 weeks ago

I have a document with have following structure

# Testcases

## Test Case 1
### Initial State
### Actions Taken
### Expected Result
### Actual Result

## Test Case 2
### Initial State
### Actions Taken
### Expected Result
### Actual Result

## Test Case 3
### Initial State
### Actions Taken
### Expected Result
### Actual Result

I am getting the following error in the lint:

MD024/no-duplicate-heading: Multiple headings with the same contentmarkdownlint(MD024)

My IDE details: Eclipse Theia IDE Version 1.50.100 VS Code API Version: 1.89.1


My understanding is, the lint should not through an error if the parent heading is different. As it can be a real world case. 
DavidAnson commented 2 weeks ago

By default, duplicate headings at any level are reported. If you want to allow duplicates across sibling sections as you show above, you need to set the siblings_only parameter in configuration. This is explained in the documentation: https://github.com/DavidAnson/markdownlint/blob/main/doc/md024.md