mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 01:05:55 +03:00
[GH-ISSUE #17] ignore hard-tabs in code block #11
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#11
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 @liyongjing on GitHub (Apr 23, 2016).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/17
for example
@DavidAnson commented on GitHub (Apr 23, 2016):
In my mind, hard tabs are a problem because no two tools agree on how many spaces they should be. For example here on GitHub, they've converted the tabs in your example to 4 spaces, though it's common to see 8-space or 2-space tabs. Because of this, I consider tabs equally problematic inside code blocks as they are outside and I think this warning is correct to fire inside a code block.
Does that seem reasonable?
@wiryls commented on GitHub (Apr 10, 2018):
@DavidAnson Sorry to bother you. The explanation is very reasonable.
But go recommends tabs instead of spaces. And almost all go projects are using tabs (in 2016).
Waiting for #82 being resolved in the future :-)
@jasonkarns commented on GitHub (Jul 26, 2025):
In addition to go, Makefiles require them. And gitconfig uses them conventionally.
Having hard-tabs fail in code blocks by default makes it difficult to use markdown lint in Super-linter. (A goal of using superlinter being to minimize cross-project configuration, so using a single meta linter across projects, and reusing github action workflows prevents the configuration from being possible. Instead requires markdown linting to be disabled in order for super linter to pass.)
@DavidAnson commented on GitHub (Jul 26, 2025):
@jasonkarns, this rule can be disabled by line, by file, or by project. Additionally, it can be configured to ignore code blocks or to ignore specific languages within code fences. Lint tools tend to be opinionated and that's unlikely to please all of the people all of the time. However, you should already have what you need to configure this rule to suit your taste.