[GH-ISSUE #145] MD025 in quoted sections unlike Ruby markdownlint #1973

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

Originally created by @jpluimers on GitHub (Sep 15, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/145

MD025 (documentation/source) gets generated within quotes.

This passes in the Ruby version of markdownlint. Their implementation is here.

Example 1: cannot start quoted heading at level 1 with #

screenshot 2018-09-06 13 27 06

# Heading 1

## Heading 2

Some text

> # Quoted heading 1

Example 2: renders OK, but you have to start at level 2 with ##

screenshot 2018-09-06 13 39 58

# Heading 1

## Heading 2

Some text

> ## Quoted heading 2
Originally created by @jpluimers on GitHub (Sep 15, 2018). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/145 MD025 ([documentation](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md025---multiple-top-level-headings-in-the-same-document)/[source](https://github.com/DavidAnson/markdownlint/blob/master/lib/md025.js)) gets generated within quotes. This [passes in the Ruby version of markdownlint](https://github.com/markdownlint/markdownlint/issues/235#issuecomment-421562927). Their implementation is [here](https://github.com/markdownlint/markdownlint/blob/master/lib/mdl/rules.rb#L374). Example 1: cannot start quoted heading at level 1 with `#` ![screenshot 2018-09-06 13 27 06](https://user-images.githubusercontent.com/2033367/45154763-f66a1600-b1d8-11e8-938c-a781073d287b.png) ``` markdown # Heading 1 ## Heading 2 Some text > # Quoted heading 1 ``` Example 2: renders OK, but you have to start at level 2 with `##` ![screenshot 2018-09-06 13 39 58](https://user-images.githubusercontent.com/2033367/45155190-6dec7500-b1da-11e8-874e-c5d15aff1c23.png) ``` markdown # Heading 1 ## Heading 2 Some text > ## Quoted heading 2 ```
kerem 2026-03-07 20:03:17 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@DavidAnson commented on GitHub (Jan 8, 2019):

Per the CommonMark specification (which is what guides this project), a heading inside a blockquote is still a heading. Therefore, the warning above is correct; there are two h1 headings in the document.

Specification: https://spec.commonmark.org/0.28/#block-quotes

Example above: https://spec.commonmark.org/dingus/?text=%23%20Heading%201%0A%0A%23%23%20Heading%202%0A%0ASome%20text%0A%0A%3E%20%23%20Quoted%20heading%201

<!-- gh-comment-id:452189988 --> @DavidAnson commented on GitHub (Jan 8, 2019): Per the CommonMark specification (which is what guides this project), a heading inside a blockquote is still a heading. Therefore, the warning above is correct; there are two `h1` headings in the document. Specification: https://spec.commonmark.org/0.28/#block-quotes Example above: https://spec.commonmark.org/dingus/?text=%23%20Heading%201%0A%0A%23%23%20Heading%202%0A%0ASome%20text%0A%0A%3E%20%23%20Quoted%20heading%201
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#1973
No description provided.