# markdown/no-missing-atx-heading-space

> Disallow headings without a space after the hash characters

`#Install` is not a heading. Without a space after the `#`, Markdown reads the line as a paragraph that starts with a hash.

`--fix` adds the space.

{/* Generated by src/codegen/lint-rule-docs.ts. Do not edit this section. */}

## Configure

Off by default. It needs an ESLint config that says which files are in the language:

{/* skip */}

```js eslint.config.js
import markdown from "@eslint/markdown";

export default [
  {
    files: ["**/*.md"],
    plugins: { markdown },
    language: "markdown/commonmark",
    rules: { "markdown/no-missing-atx-heading-space": "error" },
  },
];
```

It also works with `markdown/gfm`.

{/* End of the generated section. */}

## Examples

Reported:

{/* bad {"count": 2} */}

```md
#Install

##With Homebrew
```

Not reported:

{/* good */}

```md
# Install

## With Homebrew

Issue \#12 and #12 in the middle of a line are fine.
```

## Options

| Option                | Default | What it does                                                        |
| --------------------- | ------- | ------------------------------------------------------------------- |
| `checkClosedHeadings` | `false` | Also require a space before the `#` characters that close a heading. |

Without that space the closing `#` characters are part of the heading's text:

{/* bad {"options": [{ "checkClosedHeadings": true }]} */}

```md
# Install#
```

{/* good {"options": [{ "checkClosedHeadings": true }]} */}

```md
# Install #
```
