New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

remark-lint-heading-whitespace

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-heading-whitespace

Prevents non-breaking spaces from breaking headings

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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:

Markdown

Preview

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

Using the rule

Via .remarkrc

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:

remark xxx.md

Via CLI

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

FAQs

Package last updated on 08 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc