mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #331] Rule for unclosed unclosed code blocks using non-indented style #284
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#284
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 @nschonni on GitHub (Sep 20, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/331
When code fences are using backticks or other explicit styles, I think Markdownlint should add a warning when the block isn't closed.
I believe this would fit in the existing MD046/MD048, maybe by counting the opening vs closing blocks, but I can see this might not be straightforward to implement
Saw this was being picked up by the MicrosoftDocs build tooling and thought it would be good here too.
Here are some PRs where this is being fixed in an existing document https://github.com/dotnet/docs/pull/20716
@nschonni commented on GitHub (Oct 1, 2022):
Came to post a new issue around single backtick sections, but I think it might fall under this too.
In the spec it flags that some don't continue
https://spec.commonmark.org/0.30/#blocks-and-inlines
EX:
Here is another one on their code playground https://spec.commonmark.org/dingus/?text=Somethign%20%60foo%0Aleads%20to%20bar%60%0A%0ASomethign%20%60foo%0A%0Aleads%20to%20bar%60
A backtick continuing to the next line is ok, but not if there is a hard break before the next
Also some examples of the unbalanced cases https://spec.commonmark.org/0.30/#example-347