[GH-ISSUE #312] Rule for indentation in fenced code blocks #2113

Open
opened 2026-03-07 20:04:43 +03:00 by kerem · 5 comments
Owner

Originally created by @polarathene on GitHub (Aug 6, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/312

Ideally this could be configured based on language/context given to the code block syntax (```language). Docs that I contribute that require tabs for their config snippets prevents adopting markdownlint otherwise.

Related: https://github.com/DavidAnson/markdownlint/issues/17 https://github.com/DavidAnson/markdownlint/issues/82

Originally created by @polarathene on GitHub (Aug 6, 2020). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/312 Ideally this could be configured based on language/context given to the code block syntax (\`\`\``language`). Docs that I contribute that require tabs for their config snippets prevents adopting markdownlint otherwise. Related: https://github.com/DavidAnson/markdownlint/issues/17 https://github.com/DavidAnson/markdownlint/issues/82
Author
Owner

@DavidAnson commented on GitHub (Aug 7, 2020):

Can you please clarify the part about “prevents adopting markdownlint”? You can allow tabs in code blocks.

<!-- gh-comment-id:670291511 --> @DavidAnson commented on GitHub (Aug 7, 2020): Can you please clarify the part about “prevents adopting markdownlint”? You can allow tabs in code blocks.
Author
Owner

@polarathene commented on GitHub (Aug 7, 2020):

While the markdown documents have tabbed indentation for code snippets, contributions are reviewed to ensure that happens. markdownlint lacks a rule to detect the issue so that it can be caught and fixed automatically, so reviewers would still need to check for such themselves right?

<!-- gh-comment-id:670327396 --> @polarathene commented on GitHub (Aug 7, 2020): While the markdown documents have tabbed indentation for code snippets, contributions are reviewed to ensure that happens. `markdownlint` lacks a rule to detect the issue so that it can be caught and fixed automatically, so reviewers would still need to check for such themselves right?
Author
Owner

@DavidAnson commented on GitHub (Aug 7, 2020):

Yes, in the context of the feature you are requesting, tabs would not be required in code blocks. But that should not prevent you from using markdownlint - it’s more of a missing validation than a wrong or problematic one.

<!-- gh-comment-id:670329013 --> @DavidAnson commented on GitHub (Aug 7, 2020): Yes, in the context of the feature you are requesting, tabs would not be required in code blocks. But that should not prevent you from using markdownlint - it’s more of a missing validation than a wrong or problematic one.
Author
Owner

@polarathene commented on GitHub (Aug 7, 2020):

I understand that, but if it cannot help with that issue, the maintainers might not find it acceptable. There's a linked issue where I've pitched markdownlint, perhaps they will still express interest despite the lack of such feature.

<!-- gh-comment-id:670334647 --> @polarathene commented on GitHub (Aug 7, 2020): I understand that, but if it cannot help with that issue, the maintainers might not find it acceptable. There's a linked issue where I've pitched `markdownlint`, perhaps they will still express interest despite the lack of such feature.
Author
Owner

@DavidAnson commented on GitHub (Aug 7, 2020):

Understood. FYI, this could be implemented as a custom rule by a motivated party - no need to wait for me. :)

<!-- gh-comment-id:670336058 --> @DavidAnson commented on GitHub (Aug 7, 2020): Understood. FYI, this could be implemented as a custom rule by a motivated party - no need to wait for me. :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2113
No description provided.