[GH-ISSUE #1966] Configuration option to ignore MultiMarkdown style Meta-Data block #2639

Closed
opened 2026-03-07 20:09:35 +03:00 by kerem · 2 comments
Owner

Originally created by @septatrix on GitHub (Feb 18, 2026).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1966

We are adopting markdownlint for one of our largest repo (website) which uses MultiMarkdown style Meta-Data blocks

Title:   My Document
Summary: A brief description of my document.
Authors: Waylan Limberg
         John Doe
Date:    October 2, 2007
blank-value:
base_url: http://example.com

This is the first paragraph of the document.

Currently, we have to relax/disable some rules due to this such as first-line-heading and no-bare-urls.
It would be great if there was some way to tell markdownlint to ignore these lines like it already does for the more common Frontmatter. My first idea was to use a micromark extension but I was unable to find a way to specify which ones are used.

Currently my only idea is to disable the native rules and reimplement them all as custom rules with manual handling though that seems like a lot of effort.

Originally created by @septatrix on GitHub (Feb 18, 2026). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1966 <!-- - What did you do? - What did you expect to happen? - What actually happened? - What messages or errors were there? - How can the issue be reproduced? - What version were you using? - What operating system were you using? The simplest demonstration of a problem is the most helpful. Small examples can be pasted into the issue description. (Be sure to paste as code so GitHub doesn't render the example in Markdown.) For larger examples, linking to a repository or file is more appropriate. Thank you! --> We are adopting markdownlint for one of our largest repo (website) which uses [MultiMarkdown style Meta-Data blocks](https://github.com/fletcher/MultiMarkdown/blob/ef1038d4812322550801e9f3a2fc45a403f2a656/Documentation/MultiMarkdown%20User's%20Guide.md#metadata) ```md Title: My Document Summary: A brief description of my document. Authors: Waylan Limberg John Doe Date: October 2, 2007 blank-value: base_url: http://example.com This is the first paragraph of the document. ``` Currently, we have to relax/disable some rules due to this such as `first-line-heading` and `no-bare-urls`. It would be great if there was some way to tell markdownlint to ignore these lines like it already does for the more common Frontmatter. My first idea was to use a micromark extension but I was unable to find a way to specify which ones are used. Currently my only idea is to disable the native rules and reimplement them all as custom rules with manual handling though that seems like a lot of effort.
kerem 2026-03-07 20:09:35 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Feb 18, 2026):

If you customize the regular expression used to match front matter for your scenario, it will ignore that entire block like it does for normal front matter.

https://github.com/DavidAnson/markdownlint?tab=readme-ov-file#optionsfrontmatter

<!-- gh-comment-id:3922374471 --> @DavidAnson commented on GitHub (Feb 18, 2026): If you customize the regular expression used to match front matter for your scenario, it will ignore that entire block like it does for normal front matter. https://github.com/DavidAnson/markdownlint?tab=readme-ov-file#optionsfrontmatter
Author
Owner

@septatrix commented on GitHub (Feb 19, 2026):

Yeah, took me a while to get a somewhat working regex but I got something which should work for us.

For anyone else who stumbles upon this and would prefer not to waste hours fiddling with regexes:

# .markdownlint-cli2.yaml
frontMatter: '^(([\w-]+:.*(\r?\n))([^\S\r\n]{4,}.+(\r?\n))?)*?(\r?\n)+|^(([\w-]+:.*(\r?\n))([^\S\r\n]{4,}.+(\r?\n))?)*$'
<!-- gh-comment-id:3924067197 --> @septatrix commented on GitHub (Feb 19, 2026): Yeah, took me a while to get a somewhat working regex but I got something which should work for us. For anyone else who stumbles upon this and would prefer not to waste hours fiddling with regexes: ```yaml # .markdownlint-cli2.yaml frontMatter: '^(([\w-]+:.*(\r?\n))([^\S\r\n]{4,}.+(\r?\n))?)*?(\r?\n)+|^(([\w-]+:.*(\r?\n))([^\S\r\n]{4,}.+(\r?\n))?)*$' ```
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#2639
No description provided.