mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #55] MD009 for list continuation #1892
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#1892
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 @CircleCode on GitHub (Apr 7, 2017).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/55
when you make a multi paragraphs list, you have to continue indentation on empty lines. In this case, rule MD009 report an error.
To solve this issue, MD009 should not trigger errors for a line with only spaces if
Example:
(note: although this is not visible, line 2 is exactly 4 paragraphs)
@DavidAnson commented on GitHub (Apr 8, 2017):
I do not think that is the case. Please refer to section 5.2 of the specification, specifically example 217: http://spec.commonmark.org/0.27/#list-items
Blank lines are not required to contain a matching number of spaces. You can verify this in practice using the underlying parser here: https://markdown-it.github.io/
@DavidAnson commented on GitHub (Apr 8, 2017):
If we agree on that, I suggest it is preferable to avoid trailing whitespace for such blank lines and that the current behavior of this rule is reasonable.
@CircleCode commented on GitHub (Apr 8, 2017):
I agree with the fact that the current behavior is reasonable regarding commonmark.
If your goal is to strictly adhere to commonmark, this issue can be closed.
However, I think a lot of still living implementations require this indentation continuation.
If you don not disagree with the idea of supporting those implementations, but are reluctant to make a lot of work for them (which makes sense), maybe simply adding an option to ignore lines with only spaces for rule MD009 would be acceptable?
In any case, I'll respect your choice.
TBH, I'd love to switch to commonmark, but while there is no extension mechanism, this is too restricting for my needs.
@DavidAnson commented on GitHub (Apr 8, 2017):
Your option to ignore for blank lines seems like a good compromise, but it may not be all that difficult to implement this according to your original proposal. Thank you for the suggestion and feedback!