[GH-ISSUE #683] lists in quotes should not be linted as normal lists? #2355

Closed
opened 2026-03-07 20:06:59 +03:00 by kerem · 7 comments
Owner

Originally created by @mimoo on GitHub (Dec 19, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/683

src/plonk/lagrange.md:13 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "> - $H$: The coset we are in, ..."]

the text:

> - $H$: The coset we are in, with generator $g$ and offset $h$
> - $m$: The size of the coset $H$
> - $Z_H$: The vanishing polynomial for $H$. $Z_H(x) = \prod_{i \in [m]} (x - h \cdot g^i) = x^m - h^m$

a similar rule got triggered on something like this:

> 2. thing
> 3. thing
> 4. thing

because it didn't start with "1."

Originally created by @mimoo on GitHub (Dec 19, 2022). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/683 ``` src/plonk/lagrange.md:13 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "> - $H$: The coset we are in, ..."] ``` the text: ``` > - $H$: The coset we are in, with generator $g$ and offset $h$ > - $m$: The size of the coset $H$ > - $Z_H$: The vanishing polynomial for $H$. $Z_H(x) = \prod_{i \in [m]} (x - h \cdot g^i) = x^m - h^m$ ``` a similar rule got triggered on something like this: ``` > 2. thing > 3. thing > 4. thing ``` because it didn't start with "1."
kerem 2026-03-07 20:06:59 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner
<!-- gh-comment-id:1358155682 --> @DavidAnson commented on GitHub (Dec 19, 2022): Lists in blockquotes are valid lists as demonstrated below. Why do you think they should not be linted? <http://markdown-it.github.io/#md3=%7B%22source%22%3A%22%3E%201.%20Item%5Cn%3E%201.%20Item%5Cn%5CnText%5Cn%5Cn%3E%20-%20Item%5Cn%3E%20-%20Item%5Cn%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Atrue%2C%22_view%22%3A%22html%22%7D%7D>
Author
Owner

@mimoo commented on GitHub (Dec 20, 2022):

because I think it is a valid thing to want to quote parts of a list. For example, do you think the following should be deemed invalid markdown text:


Here's my recipe:

  1. add eggs
  2. add sugar
  3. add flour

notice the last two steps:

  1. add sugar
  2. add flour

which do not make sense

<!-- gh-comment-id:1358794065 --> @mimoo commented on GitHub (Dec 20, 2022): because I think it is a valid thing to want to quote parts of a list. For example, do you think the following should be deemed invalid markdown text: --- Here's my recipe: 1. add eggs 2. add sugar 3. add flour notice the last two steps: > 2. add sugar > 3. add flour which do not make sense
Author
Owner

@DavidAnson commented on GitHub (Dec 20, 2022):

It sounds like you have a pretty specific scenario where are you deliberately want to include an incomplete list inside a blockquote. For special cases like yours, it may be best to disable this rule for that part of your document (or maybe for your entire project). However, I do not think this scenario is a reason not to ever lint lists inside a blockquote.

<!-- gh-comment-id:1358799072 --> @DavidAnson commented on GitHub (Dec 20, 2022): It sounds like you have a pretty specific scenario where are you deliberately want to include an incomplete list inside a blockquote. For special cases like yours, it may be best to disable this rule for that part of your document (or maybe for your entire project). However, I do not think this scenario is a reason not to ever lint lists inside a blockquote.
Author
Owner

@scottamain commented on GitHub (Dec 21, 2022):

FYI @mimoo here's how to disable:

<!-- markdownlint-disable MD029 -->
> 2. thing
> 3. thing
> 4. thing
<!-- markdownlint-enable MD029 -->
<!-- gh-comment-id:1361876737 --> @scottamain commented on GitHub (Dec 21, 2022): FYI @mimoo here's how to disable: ``` <!-- markdownlint-disable MD029 --> > 2. thing > 3. thing > 4. thing <!-- markdownlint-enable MD029 --> ```
Author
Owner

@mimoo commented on GitHub (Dec 21, 2022):

mmm, I still disagree because a quote semantically should be able to quote the exact text (and a list is text) so I'm just going to disable that rule globally

<!-- gh-comment-id:1362164589 --> @mimoo commented on GitHub (Dec 21, 2022): mmm, I still disagree because a quote semantically should be able to quote the exact text (and a list is text) so I'm just going to disable that rule globally
Author
Owner

@DavidAnson commented on GitHub (Dec 22, 2022):

Great!

<!-- gh-comment-id:1362244543 --> @DavidAnson commented on GitHub (Dec 22, 2022): Great!
Author
Owner

@jeroenheijmans commented on GitHub (Mar 13, 2023):

Came here to ask the same thing, the rationale for it being the way it is seems fair enough. Especially with aforementioned workaround. I wanted to add to the conversation with a somewhat more extended example which may help others

# Going through another post

Let's talk about some other post.
We will go through the points in the other post step by step.

<!-- markdownlint-disable MD029 -->

The first thing the other post says is:

> 1. Something incredible

And apparently that is incredible.
But the second point they make is:

> 2. Something less credible

Which we can also talk about at length in non-quoted content.
The linting rule remains disabled.
Even for a third point:

> 3. Something final

Which in this example is the last point in the other post.
So now we can safely enable the linting rule again.

<!-- markdownlint-enable MD029 -->

Which means:

1. Quoted lists above don't give warnings.
2. This list is linted properly
3. The full markdown looks very clean

Which is great!

Thanks again for a great plugin. It helps me keep my ramblings somwehat readable!

<!-- gh-comment-id:1465854088 --> @jeroenheijmans commented on GitHub (Mar 13, 2023): Came here to ask the same thing, the rationale for it being the way it is seems fair enough. Especially with [aforementioned workaround](https://github.com/DavidAnson/markdownlint/issues/683#issuecomment-1361876737). I wanted to add to the conversation with a somewhat more extended example which may help others ```markdown # Going through another post Let's talk about some other post. We will go through the points in the other post step by step. <!-- markdownlint-disable MD029 --> The first thing the other post says is: > 1. Something incredible And apparently that is incredible. But the second point they make is: > 2. Something less credible Which we can also talk about at length in non-quoted content. The linting rule remains disabled. Even for a third point: > 3. Something final Which in this example is the last point in the other post. So now we can safely enable the linting rule again. <!-- markdownlint-enable MD029 --> Which means: 1. Quoted lists above don't give warnings. 2. This list is linted properly 3. The full markdown looks very clean Which is great! ``` Thanks again for a great plugin. It helps me keep my ramblings _somwehat_ readable!
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#2355
No description provided.