mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 01:05:55 +03:00
[GH-ISSUE #1420] MD025 does not trigger when first lines are empty and/or comments #2531
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#2531
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xefiry on GitHub (Nov 15, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1420
The error MD025 "Multiple top-level headings in the same document" should trigger when there is more than one heading level 1 in the document.
However, if there are empty and/or comment lines before the first heading, the error does not trigger.
Example with an empty line and a comment
In this example, the comment is to ignore Title in the generation of the table of content by the extension Markdown All in One, but any comment will do.
The error can be reproduced with any amount of comment lines or empty lines before the first heading.
@DavidAnson commented on GitHub (Nov 16, 2024):
This rule is behaving as documented (a top level heading must be on the first line), but I agree that being preceeded by a blank line doesn't seem like it should disable the rule.
https://github.com/DavidAnson/markdownlint/blob/main/doc/md025.md