mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #47] MD030, Spaces after list markers isn’t enforced if 0 spaces #1887
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#1887
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @thomasjbradley on GitHub (Feb 17, 2017).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/47
Here’s an example of incorrect Markdown:
I would like to enforce a single space after those dashes in the list. Without the space Markdown interprets it as a paragraph.
Important configuration I have turned on:
What error message I do see:
MD032 — Lists should be surrounded by blank lines.Which doesn’t make sense to me because those aren’t separate lists. It’s interpreting the last, correct dash, as a list and the other two as paragraphs.
Use case:
I teach beginners, people who have never written a line of Markdown before. The idea that a missing space can have such an impact is foreign. I’d like to use the linter to find these simple mistakes beforehand.
Any thoughts would be appreciated. Thanks.
@DavidAnson commented on GitHub (Feb 17, 2017):
The specification is clear about the need for spaces after list markers: http://spec.commonmark.org/0.27/#list-items
So the output you're getting is technically correct. That said, I agree it's not the most helpful for this scenario. I'll think about how to modify the rule to make things more clear. Thank you!
@thomasjbradley commented on GitHub (Feb 17, 2017):
Thanks for your response.
I just read the spec—and yes it does definitely require as space as you say.
And yeah, you’re right that the error message is “technically” correct—but not terribly helpful.
Though it’s explained to my students that a space is required after a list marker only about half actually add it. It’d be great to come up with a helpful solution.
Just some thoughts here:
Thanks for your help.
@DavidAnson commented on GitHub (Feb 17, 2017):
I think I can do something useful here. :) Let me finish working on a different issue then I will look into this some more.
@thomasjbradley commented on GitHub (Feb 17, 2017):
Awesome, thanks.
@DavidAnson commented on GitHub (Feb 18, 2017):
When people make this mistake, do they tend to forget just some of the spaces or all of them?
@thomasjbradley commented on GitHub (Feb 18, 2017):
It’s almost always all of the spaces.
@DavidAnson commented on GitHub (Feb 21, 2017):
This seems like it will be more of a heuristic than an absolute - I'm going to make it a new rule so it can be disabled independently of
MD030. I have an implementation in mind, but it may not make the cut for the upcoming release.@thomasjbradley commented on GitHub (Feb 21, 2017):
Okay—thanks so much for looking into it.
@chrisdebian commented on GitHub (Nov 3, 2025):
Hi, all. This issue's getting quite old now, I wonder if it got resolved in later releases?
Chris
@DavidAnson commented on GitHub (Nov 3, 2025):
You can see how the latest version behaves below. This behavior has not changed.
https://dlaa.me/markdownlint/#%25m%23%20Issue%2047%0A%0A-Some%20stuff%0A-More%20stuff%0A-%20Things%0A