[GH-ISSUE #37] MD041 (first-line-h1) and HTML comments #28

Closed
opened 2026-03-03 01:23:09 +03:00 by kerem · 1 comment
Owner

Originally created by @EvgenyOrekhov on GitHub (Dec 3, 2016).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/37

I find it convenient to disable some rules for the whole file by adding a markdownlint marker to the top of the file (as I would do with JSLint directives, for example):

<!-- markdownlint-disable line-length -->
# Header

...

But this violates MD041 (first-line-h1) rule.
I think MD041 (first-line-h1) should ignore HTML comments.

Originally created by @EvgenyOrekhov on GitHub (Dec 3, 2016). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/37 I find it convenient to disable some rules for the whole file by adding a markdownlint marker to the top of the file (as I would do with JSLint directives, for example): ```md <!-- markdownlint-disable line-length --> # Header ... ``` But this violates MD041 (first-line-h1) rule. I think MD041 (first-line-h1) should ignore HTML comments.
kerem 2026-03-03 01:23:09 +03:00
Author
Owner

@DavidAnson commented on GitHub (Dec 3, 2016):

Agreed

<!-- gh-comment-id:264669802 --> @DavidAnson commented on GitHub (Dec 3, 2016): Agreed
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#28
No description provided.