Skip to content

MD020 - no-missing-space-closed-atx

Description

This rule is triggered when spaces are missing inside the hash characters in a closed ATX style heading. Both sides of the heading text must have a space separating it from the hash characters.

Rationale

Violations of this rule can lead to improperly rendered content. Some Markdown parsers require spaces around heading text in closed ATX style headings for proper rendering.

Examples

Invalid

#Heading 1#

##Heading 2##

###Heading 3###

Missing spaces inside hashes on closed ATX style headings.

Valid

# Heading 1 #

## Heading 2 ##

### Heading 3 ###

Proper spacing around heading text in closed ATX style.