[GH-ISSUE #139] "MD010 - Hard tabs" - ignore for code fences? #118

Closed
opened 2026-03-03 01:23:53 +03:00 by kerem · 4 comments
Owner

Originally created by @gandalfsaxe on GitHub (Jul 31, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/139

Hi,

If I'm having a code fence in markdown for a language that may contain tabs, markdownlink shouldn't mark this with a MD010 warning? Because it's not markdown, it's a "quote" of another programming language that perhaps may contain tabs.

E.g. this .gitattributes content have tabs and that's fine:

*               text=auto
*.txt		text
*.vcproj	text eol=crlf
*.sh		text eol=lf
*.jpg		-text
Originally created by @gandalfsaxe on GitHub (Jul 31, 2018). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/139 Hi, If I'm having a code fence in markdown for a language that may contain tabs, markdownlink shouldn't mark this with a MD010 warning? Because it's not markdown, it's a "quote" of another programming language that perhaps may contain tabs. E.g. this `.gitattributes` content have tabs and that's fine: ``` * text=auto *.txt text *.vcproj text eol=crlf *.sh text eol=lf *.jpg -text ```
kerem 2026-03-03 01:23:53 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Jul 31, 2018):

You want to set the code_blocks parameter of MD010 to false: https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md010

<!-- gh-comment-id:409273275 --> @DavidAnson commented on GitHub (Jul 31, 2018): You want to set the `code_blocks` parameter of MD010 to `false`: https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md010
Author
Owner

@gandalfsaxe commented on GitHub (Jul 31, 2018):

Ah sorry, didn't know how I overlooked that. Curious, why is the default true?

<!-- gh-comment-id:409363115 --> @gandalfsaxe commented on GitHub (Jul 31, 2018): Ah sorry, didn't know how I overlooked that. Curious, why is the default true?
Author
Owner

@DavidAnson commented on GitHub (Aug 1, 2018):

In my experience, tabs are handled differently by many tools. So I would prefer not to have any in my document which should lead to the most predictable behavior. But for scenarios where tabs are wanted in code, this option lets you allow them.

<!-- gh-comment-id:409413574 --> @DavidAnson commented on GitHub (Aug 1, 2018): In my experience, tabs are handled differently by many tools. So I would prefer not to have any in my document which should lead to the most predictable behavior. But for scenarios where tabs are wanted in code, this option lets you allow them.
Author
Owner

@gandalfsaxe commented on GitHub (Aug 1, 2018):

I see. Thanks for the elaboration.

On 1 Aug 2018, at 02.53, David Anson notifications@github.com wrote:

In my experience, tabs are handled differently by many tools. So I would prefer not to have any in my document which should lead to the most predictable behavior. But for scenarios where tabs are wanted in code, this option lets you allow them.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<!-- gh-comment-id:409450427 --> @gandalfsaxe commented on GitHub (Aug 1, 2018): I see. Thanks for the elaboration. > On 1 Aug 2018, at 02.53, David Anson <notifications@github.com> wrote: > > In my experience, tabs are handled differently by many tools. So I would prefer not to have any in my document which should lead to the most predictable behavior. But for scenarios where tabs are wanted in code, this option lets you allow them. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or mute the thread.
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#118
No description provided.