A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vhf/remark-lint-heading-whitespace below:

GitHub - vhf/remark-lint-heading-whitespace

remark-lint-heading-whitespace

This is a remark-lint rule.

On some keyboards, for instance the default Swiss German keyboard layout de_CH QWERTZ layout, the # symbol is obtained using alt-3. Because alt-space inserts a non-breaking space, it seems easy to insert #<non-breaking space> by mistake while writing Markdown heading # title.

This leads to headings getting parsed as normal Markdown paragraphs, here a and c are normal headings, b and d have probably been typed too fast without releasing the alt key between # and space:

This remark-lint rule prevents this from ever happening by throwing an error whenever such situations are detected.

npm install -g remark-cli
npm install remark-lint remark-lint-heading-whitespace

Then, set up your .remarkrc:

{
  "plugins": [
    "lint",
    "lint-heading-whitespace"
  ]
}

Now you can use the following command to run the lint:

npm install -g remark-cli
npm install remark-lint remark-lint-heading-whitespace
remark -u lint -u lint-heading-whitespace xxx.md

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4