[GH-ISSUE #355] MD025 Triggered when markdown contains comments #2148

Closed
opened 2026-03-07 20:05:01 +03:00 by kerem · 1 comment
Owner

Originally created by @chrisreddington on GitHub (Dec 10, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/355

Hi All, I'm leveraging the GitHub Superlinter as part of my project, which uses the markdownlint project for the markdown aspects (Thank you for the work!)

I've noticed in one of my markdown files, that I have a Title which is being flagged by the linter, because it believes there are multiple top level headings in the same document.

As an example -

---
#####
# Required
#####
description: "" # This is a short summary of the page, which is used for SEO (Search Engine Optimisation purposes) It does not appear to the users, but is used as part of the site's metadata, which is used by search engines. Therefore, it's strongly recommended to set this to something meaningful, as it will have a positive impact on discoverability of your content in public searches.populated the page's description metadata.
publishDate: "" # Date that the page should be published
title: "Offline" # Title of the page
---

# No Internet Access

Oops! It looks like you're unable to access the internet right now :(

Is there a way to ignore the contents of frontmatter? I thought this should happen by default, from what I understood in the docs. Thanks in advance for the help!

Originally created by @chrisreddington on GitHub (Dec 10, 2020). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/355 Hi All, I'm leveraging the GitHub Superlinter [as part of my project](https://github.com/chrisreddington/hugo-community/runs/1529782907), which uses the markdownlint project for the markdown aspects (Thank you for the work!) I've noticed in one of my markdown files, that I have a Title which is being flagged by the linter, because it believes there are multiple top level headings in the same document. As an example - ``` --- ##### # Required ##### description: "" # This is a short summary of the page, which is used for SEO (Search Engine Optimisation purposes) It does not appear to the users, but is used as part of the site's metadata, which is used by search engines. Therefore, it's strongly recommended to set this to something meaningful, as it will have a positive impact on discoverability of your content in public searches.populated the page's description metadata. publishDate: "" # Date that the page should be published title: "Offline" # Title of the page --- # No Internet Access Oops! It looks like you're unable to access the internet right now :( ``` Is there a way to ignore the contents of frontmatter? I thought this should happen by default, from what I understood in the docs. Thanks in advance for the help!
kerem 2026-03-07 20:05:01 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Dec 10, 2020):

You can change this behavior by configuring the way front matter is handled by the rule as documented here: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md041 This scenario is highlighted there.

<!-- gh-comment-id:742648579 --> @DavidAnson commented on GitHub (Dec 10, 2020): You can change this behavior by configuring the way front matter is handled by the rule as documented here: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md041 This scenario is highlighted there.
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#2148
No description provided.