mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #107] MD013 "code_blocks": false does not work inside listing #89
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#89
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 @chicco785 on GitHub (Mar 1, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/107
i enabled the following option:
but when i run on the following type of code (the indentation is required to avoid numbering to restart at 1):
i get the following errors:
docs/platform/swarmcluster.md: 44: MD013/line-length Line length [Expected: 80; Actual: 91]@DavidAnson commented on GitHub (Mar 1, 2018):
To be proper, the code blocks should be indented three spaces so they start in the same column as the list item content (two spaces is for unordered lists). I can’t try that on my phone right now - could you let me know if it helps?
@chicco785 commented on GitHub (Mar 1, 2018):
it does not change the result (btw, i am using the command line client to lint the file, I suppose it should not make any difference)
@DavidAnson commented on GitHub (Mar 1, 2018):
Ok, sorry. I will look at this when I finish the current feature.
@snordmann commented on GitHub (Oct 23, 2018):
The change you did was to allow zero to three spaces in front of code blocks. This change doesn't work on nested lists:
Is there a reason to exclude nested lists and not allow all spaces before code blocks?
I propose a change from:
to:
@DavidAnson commented on GitHub (Oct 23, 2018):
I think I read the specification too literally: https://spec.commonmark.org/0.28/#fenced-code-blocks
It talks about indents, but isn’t explicit (in this section) whether the indent is relative to the start of the line (as I implemented) or the current indent level (as in a list like you show). And none of the examples there are affected by this.
Your proposal seems not to be entirely right, either, because 4 spaces creates an indented code block (example 103) but isn’t handled differently.
Could you please create a new issue? It may be tricky to handle this with a RegExp, but I agree the current behavior should be improved.
Thank you!