Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

id MDS064
name atx-heading-whitespace
status ready
description ATX heading whitespace and indentation.
category heading
nature style
maintainability
markdownlint
id name partial default
MD018
no-missing-space-atx
false
true
id name partial default
MD019
no-multiple-space-atx
false
true
id name partial default
MD020
no-missing-space-closed-atx
true
true
id name partial default
MD021
no-multiple-space-closed-atx
false
true
id name partial default
MD023
heading-start-left
false
true
rumdl
id name partial default
MD018
no-space-atx
false
true
id name partial default
MD019
multiple-space-atx
false
true
id name partial default
MD020
no-space-closed-atx
true
true
id name partial default
MD021
multiple-space-closed-atx
false
true
id name partial default
MD023
heading-start-left
false
true
mado
id name partial default
MD018
no-missing-space-atx
false
true
id name partial default
MD019
no-multiple-space-atx
false
true
id name partial default
MD020
no-missing-space-closed-atx
true
false
id name partial default
MD021
no-multiple-space-closed-atx
false
true
id name partial default
MD023
heading-start-left
false
true
panache
obsidian-linter
id name partial default
headings-start-line
headings-start-line
true
false
gomarklint

MDS064: atx-heading-whitespace

ATX heading whitespace and indentation.

Flags malformed ATX headings. When the heading has content, checks that the opening hashes are followed by exactly one space (not a tab, not two spaces); empty headings (## with nothing after the hashes) are valid. Also checks that the heading starts at column 1, and that no closing hash sequence appears after the content. A trailing # run is only treated as a closing marker when preceded by whitespace; a # with no preceding space is kept as content.

Config

Enable:

rules:
  atx-heading-whitespace: true

Disable:

rules:
  atx-heading-whitespace: false

Examples

Bad

Missing space after #:

#Heading

Multiple spaces after #:

#  Heading

Indented heading:

   # Heading

Closing # marker (any whitespace before #):

# Heading #

Multiple spaces before closing #:

# Heading  #

Tab after opening #:

#	Heading

Good

# Heading

## Section

### Subsection

Meta-Information

  • ID: MDS064
  • Name: atx-heading-whitespace
  • Status: ready
  • Default: enabled
  • Fixable: yes
  • Implementation: source
  • Category: heading
  • markdownlint:
    • MD018 (no-missing-space-atx)
    • MD019 (no-multiple-space-atx)
    • MD020 (no-missing-space-closed-atx) (partial)
    • MD021 (no-multiple-space-closed-atx)
    • MD023 (heading-start-left)
  • rumdl:
    • MD018 (no-space-atx)
    • MD019 (multiple-space-atx)
    • MD020 (no-space-closed-atx) (partial)
    • MD021 (multiple-space-closed-atx)
    • MD023 (heading-start-left)
  • mado:
    • MD018 (no-missing-space-atx)
    • MD019 (no-multiple-space-atx)
    • MD020 (no-missing-space-closed-atx) (partial)
    • MD021 (no-multiple-space-closed-atx)
    • MD023 (heading-start-left)
  • obsidian-linter: headings-start-line (partial)