Skip to content

MD010 - no-hard-tabs

Description

This rule detects hard tab characters in Markdown files. It triggers on any lines that contain tab characters. Code blocks and inline code spans are skipped unless code_blocks is enabled, and front matter is never checked. The fix expands each tab to the next 4-column tab stop, so content stays on the same column, and removes trailing whitespace that contains a tab instead of turning it into spaces, which would create a hard line break.

Fixable: Yes

Rationale

Hard tabs are often rendered inconsistently by different editors and can be harder to work with than spaces. Different applications interpret tab width differently (some use 4 spaces, others 8), creating formatting problems across platforms.

Configuration

code_blocks

Whether to check code blocks and inline code spans for hard tabs. When False (default), fenced code blocks, indented code blocks, and inline code spans are ignored, since some languages (such as Makefiles) require tabs. When True, they are checked and fixed.

  • Default: false