[GH-ISSUE #1947] MD010: make an exception for the content of code blocks. #2632

Closed
opened 2026-03-07 20:09:32 +03:00 by kerem · 2 comments
Owner

Originally created by @randolf-scholz on GitHub (Feb 10, 2026).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1947

# AGENTS.md

## Formatting

- use tabs for indentation
- in tables, use leading line breaks for alignment:

  ```tex
  \begin{tabular}{ll}
  	foo & baz
  \\	bar & etc
  \end{tabular}
  ```

- Etc.
  demo.md:10:3 error MD010/no-hard-tabs Hard tabs [Column: 3]
  demo.md:11:5 error MD010/no-hard-tabs Hard tabs [Column: 5]

Here, the tex-code block itself is indented with spaces, but the code snippet itself contains tabs in agreement with the formatting instructions. MD010 should probably not apply to the content of code blocks themselves.

Originally created by @randolf-scholz on GitHub (Feb 10, 2026). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1947 ~~~md # AGENTS.md ## Formatting - use tabs for indentation - in tables, use leading line breaks for alignment: ```tex \begin{tabular}{ll} foo & baz \\ bar & etc \end{tabular} ``` - Etc. ~~~ ``` demo.md:10:3 error MD010/no-hard-tabs Hard tabs [Column: 3] demo.md:11:5 error MD010/no-hard-tabs Hard tabs [Column: 5] ``` Here, the tex-code block itself is indented with spaces, but the code snippet itself contains tabs in agreement with the formatting instructions. MD010 should probably not apply to the content of code blocks themselves.
kerem 2026-03-07 20:09:32 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Feb 10, 2026):

You can opt out for code blocks with the code_blocks parameter:

https://github.com/DavidAnson/markdownlint/blob/main/doc/md010.md

<!-- gh-comment-id:3879616224 --> @DavidAnson commented on GitHub (Feb 10, 2026): You can opt out for code blocks with the `code_blocks` parameter: https://github.com/DavidAnson/markdownlint/blob/main/doc/md010.md
Author
Owner

@randolf-scholz commented on GitHub (Feb 10, 2026):

Oh my bad, I didn't realize that at all.

<!-- gh-comment-id:3879716168 --> @randolf-scholz commented on GitHub (Feb 10, 2026): Oh my bad, I didn't realize that at all.
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#2632
No description provided.