[GH-ISSUE #430] MD053 / Horizontal Rule style complains when horizontal rule in blockquotes #360

Closed
opened 2026-03-03 01:26:02 +03:00 by kerem · 5 comments
Owner

Originally created by @redactedscribe on GitHub (Sep 19, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/430

I'd like to use a horizontal rule inside of blockquotes to help with separation without having to resort to needing to place some text between two separate blockquotes (as suggested in MD028).

L1  > Some text.
L2  >
L3  > ---
L4  > Some more text.

Problem is, line 3 complains about consistency due to a plain --- already existing outside of the block quote.

I've tried:

"markdownlint.config": {
    "hr-style": {
        "style": "> ---"
    }
}

But this of course only makes the plain --- to be the one to complain.

Is there some way to specify multiple valid style values? Or maybe the MD rule can be improved to account for this use case (I don't know its implications for all the markdown interpreters)? The "consistent" value should mean the use of the same style of horizontal rule, --- vs ***, rather than if it's inside a blockquote or not, right?

I'm not sure if it's expected, but, if line 2 isn't included as a spacer, line 1 complains with:

MD003/heading-style/header-style: Heading style [Expected: atx; Actual: setext]

and

MD022/blanks-around-headings/blanks-around-headers: Headings should be surrounded by blank lines`.

Is > a type of header, or is this a bug? I can live with inserting a blank line, but I thought I'd mention this just in case.

Thanks.

markdownlint v0.44.0

Originally created by @redactedscribe on GitHub (Sep 19, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/430 I'd like to use a horizontal rule inside of blockquotes to help with separation without having to resort to needing to place some text between two separate blockquotes (as suggested in [MD028](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md028---blank-line-inside-blockquote)). ```markdown L1 > Some text. L2 > L3 > --- L4 > Some more text. ``` Problem is, line 3 complains about consistency due to a plain `---` already existing outside of the block quote. I've tried: ```json "markdownlint.config": { "hr-style": { "style": "> ---" } } ``` But this of course only makes the plain `---` to be the one to complain. Is there some way to specify multiple valid `style` values? Or maybe the MD rule can be improved to account for this use case (I don't know its implications for all the markdown interpreters)? The "consistent" value should mean the use of the same style of horizontal rule, `---` vs `***`, rather than if it's inside a blockquote or not, right? I'm not sure if it's expected, but, if line 2 isn't included as a spacer, line 1 complains with: ``` MD003/heading-style/header-style: Heading style [Expected: atx; Actual: setext] ``` and ``` MD022/blanks-around-headings/blanks-around-headers: Headings should be surrounded by blank lines`. ``` Is `>` a type of header, or is this a bug? I can live with inserting a blank line, but I thought I'd mention this just in case. Thanks. markdownlint v0.44.0
kerem 2026-03-03 01:26:02 +03:00
Author
Owner

@DavidAnson commented on GitHub (Sep 19, 2021):

The block quoted HR should not be reported as a consistency violation. Here's a reproduction: https://dlaa.me/markdownlint/#%25m%23%20Issue%20430%0A%0A---%0A%0A%3E%20Text%0A%3E%0A%3E%20---%0A%3E%20Text%0A

<!-- gh-comment-id:922551132 --> @DavidAnson commented on GitHub (Sep 19, 2021): The block quoted HR should not be reported as a consistency violation. Here's a reproduction: https://dlaa.me/markdownlint/#%25m%23%20Issue%20430%0A%0A---%0A%0A%3E%20Text%0A%3E%0A%3E%20---%0A%3E%20Text%0A
Author
Owner

@DavidAnson commented on GitHub (Sep 19, 2021):

The messages when blank line L2 are not present are correct; that syntax is interpreted as a setext heading (note bold L1 text): https://dlaa.me/markdownlint/#%25m%23%20Issue%20430%0A%0A%3E%20Text%0A%3E%20---%0A%3E%20Text%0A

<!-- gh-comment-id:922551660 --> @DavidAnson commented on GitHub (Sep 19, 2021): The messages when blank line L2 are not present are correct; that syntax is interpreted as a setext heading (note bold L1 text): https://dlaa.me/markdownlint/#%25m%23%20Issue%20430%0A%0A%3E%20Text%0A%3E%20---%0A%3E%20Text%0A
Author
Owner

@redactedscribe commented on GitHub (Dec 28, 2021):

Hello @DavidAnson, thanks for the fix.

I was wondering if this will be applied to vscode-markdownlint as well? At the time of posting, I wasn't aware that there was also a vscode repo.

<!-- gh-comment-id:1002114754 --> @redactedscribe commented on GitHub (Dec 28, 2021): Hello @DavidAnson, thanks for the fix. I was wondering if this will be applied to vscode-markdownlint as well? At the time of posting, I wasn't aware that there was also a vscode repo.
Author
Owner

@DavidAnson commented on GitHub (Dec 28, 2021):

Yes. Next update will be to markdownlint-cli2, then the VS Code extension.

<!-- gh-comment-id:1002218449 --> @DavidAnson commented on GitHub (Dec 28, 2021): Yes. Next update will be to markdownlint-cli2, then the VS Code extension.
Author
Owner

@redactedscribe commented on GitHub (Dec 28, 2021):

Great news! And by the looks of it, you're closing in on being able to fix the presence of parentheses in paths issue. Looking forward to being able to make use of this extension again (most my *.md files reside within such a path).

<!-- gh-comment-id:1002231242 --> @redactedscribe commented on GitHub (Dec 28, 2021): Great news! And by the looks of it, you're closing in on being able to fix the presence of parentheses in paths issue. Looking forward to being able to make use of this extension again (most my *.md files reside within such a path).
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#360
No description provided.