Update getHeadingText helper to exclude HTML comments from returned heading text (fixes #1411).

This commit is contained in:
David Anson 2025-03-04 21:04:24 -08:00
parent d36a57d680
commit d5cb5c8546
4 changed files with 33 additions and 2 deletions

View file

@ -95,6 +95,12 @@ BB
{MD024:94}
## Headings <!-- that differ -->
## Headings <!-- in comments -->
{MD024:-2}
<!-- markdownlint-configure-file {
"heading-style": false,
"no-duplicate-heading": {

View file

@ -15554,6 +15554,19 @@ Generated by [AVA](https://avajs.dev).
'no-duplicate-heading',
],
},
{
errorContext: 'Headings',
errorDetail: null,
errorRange: null,
fixInfo: null,
lineNumber: 100,
ruleDescription: 'Multiple headings with the same content',
ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md024.md',
ruleNames: [
'MD024',
'no-duplicate-heading',
],
},
{
errorContext: 'A',
errorDetail: null,
@ -15722,6 +15735,12 @@ Generated by [AVA](https://avajs.dev).
{MD024:94}␊
## Headings <!-- that differ -->
## Headings <!-- in comments -->
{MD024:-2}␊
<!-- markdownlint-configure-file {␊
"heading-style": false,␊
"no-duplicate-heading": {␊