mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #158] Erroneously marks 4 space indentations as warning for unordered lists #124
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#124
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 @poshcodebear on GitHub (Sep 26, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/158
When working with unordered lists, if I'm using 4 space indentations (as per the spec), it marks them as invalid with
[markdownlint] MD007/ul-indent: Unordered list indentation [Expected: 2; Actual: 4].Example:
Ordered lists, on the other hand, don't get warnings for either 2 or 4 space indentations.
Since 4 spaces is what's specified in the official spec, and it's more that many implementations let you do 2 spaces, I feel this should be corrected to allow 4 spaces without warnings.
@DavidAnson commented on GitHub (Sep 26, 2018):
I don’t think it’s quite true that the spec calls for 4 spaces. For that and more discussion of this topic, please see https://github.com/DavidAnson/markdownlint/issues/141 and linked issues.
Sent with GitHawk
@poshcodebear commented on GitHub (Sep 26, 2018):
It occurs to me that, when searching to see if this was open, I should have also looked for MD007.
Anyway, thanks for pointing that out! I thought the original design spec said 4, but I'll be the first to point out that I can make mistakes :)
Anyway, if there's any way for it to support both, that would be great; maybe have the rule, instead of "x number of spaces on indent" be something like "consistent indentation size through the document"? I have no idea how doable that is or how much processing that would add to the extension, though.
You mentioned in the other thread that this behavior is configurable; I hunted that down and set MD007 to 4 spaces in my VSCode user settings and that seems to have done the trick for me. Maybe a solution could be adding to the tool-tip somehow to hint that it's configurable, maybe with a link to instructions for that?
Anyway, thank you for this extension, it has helped me get a lot better in my markdown :)
@DavidAnson commented on GitHub (Sep 26, 2018):
Cool, thanks!
Sent with GitHawk
@DavidAnson commented on GitHub (Mar 19, 2019):
Please see #141 for an explanation of why I don’t see a good way to make everyone happy here.
@poshcodebear commented on GitHub (Mar 19, 2019):
I still think adding a note to the tooltip that this is configurable could help, but either way, thank you for pointing me down that avenue.
@DavidAnson commented on GitHub (Apr 6, 2019):
Follow-up: I've done this in
github.com/DavidAnson/vscode-markdownlint@33ee19a243