[GH-ISSUE #459] False MD401 Errors (First line in a file should be a top level heading) #2228

Closed
opened 2026-03-07 20:05:47 +03:00 by kerem · 3 comments
Owner

Originally created by @FrightRisk on GitHub (Nov 8, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/459

This error comes up now everytime I create a new page. The page is no different than any other page. I use a line of asterisks above and below my H1 headings. The top asterisk like shows the squigglies and gives me an error. I can't see a pattern and there are no special characters in the .rtf file seen in a next editor. Yet if I delete the file and then cut and paste it all back in again and save, the error goes away. This has just started happening in the last couple of weeks.

Originally created by @FrightRisk on GitHub (Nov 8, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/459 This error comes up now everytime I create a new page. The page is no different than any other page. I use a line of asterisks above and below my H1 headings. The top asterisk like shows the squigglies and gives me an error. I can't see a pattern and there are no special characters in the .rtf file seen in a next editor. Yet if I delete the file and then cut and paste it all back in again and save, the error goes away. This has just started happening in the last couple of weeks.
kerem 2026-03-07 20:05:47 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@nschonni commented on GitHub (Nov 8, 2021):

If you're putting those astrix lines above and below your heading, it is likely being interpreted as front matter rather than a plain H1

<!-- gh-comment-id:963441674 --> @nschonni commented on GitHub (Nov 8, 2021): If you're putting those astrix lines above and below your heading, it is likely being interpreted as front matter rather than a plain H1
Author
Owner

@DavidAnson commented on GitHub (Nov 8, 2021):

If the first line of the file is a line of asterisks as I think you are saying, then this rule is correctly reporting that the first line is not a top-level heading. If not, please show a small example of the Markdown you are using.

<!-- gh-comment-id:963514477 --> @DavidAnson commented on GitHub (Nov 8, 2021): If the first line of the file is a line of asterisks as I think you are saying, then this rule is correctly reporting that the first line is not a top-level heading. If not, please show a small example of the Markdown you are using.
Author
Owner

@DavidAnson commented on GitHub (Nov 8, 2021):

(What Nick suggested.)

<!-- gh-comment-id:963514951 --> @DavidAnson commented on GitHub (Nov 8, 2021): (What Nick suggested.)
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#2228
No description provided.