{"_id":"remark-lint-heading-whitespace","_rev":"1515278","name":"remark-lint-heading-whitespace","description":"Prevents non-breaking spaces from breaking headings","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"vhf","email":"victor@draft.li"}],"time":{"modified":"2026-10-03T01:48:28.000Z","created":"2018-02-08T19:22:00.482Z","1.0.0":"2018-02-08T19:22:00.482Z"},"users":{},"author":{"name":"Victor Felder","email":"victor@draft.li"},"repository":{"type":"git","url":"git+https://github.com/vhf/remark-lint-heading-whitespace.git"},"versions":{"1.0.0":{"name":"remark-lint-heading-whitespace","version":"1.0.0","description":"Prevents non-breaking spaces from breaking headings","author":{"name":"Victor Felder","email":"victor@draft.li"},"repository":{"type":"git","url":"git+https://github.com/vhf/remark-lint-heading-whitespace.git"},"license":"MIT","dependencies":{"mdast-util-to-string":"^1.0.4","unified-lint-rule":"^1.0.2","unist-util-visit":"^1.3.0"},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-eslint":"^8.2.1","babel-preset-env":"^1.6.1","eslint":"^4.17.0","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-import":"^2.8.0","remark":"^9.0.0","remark-cli":"^5.0.0","remark-lint":"^6.0.1","tape":"^4.8.0"},"scripts":{"build-md":"remark . -qfo","build-lib":"babel lib -d dist","build":"npm run build-md && npm run build-lib","lint":"eslint .","test-api":"node test","test":"npm run build && npm run lint && npm run test-api"},"bugs":{"url":"https://github.com/vhf/remark-lint-heading-whitespace/issues"},"homepage":"https://github.com/vhf/remark-lint-heading-whitespace#readme","main":"dist/heading-whitespace-lint.js","gitHead":"1a9714db8a8ab989ae7e74c64a3400b48402a52f","_id":"remark-lint-heading-whitespace@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"vhf","email":"victor@draft.li"},"dist":{"integrity":"sha512-DykoBIXNbkihg64D+mztSOv3l82RTH4tIZW/HUB4QM4NpIEB+pVIPQpCYD0K4pTgvKiwoqsj4NY8qJ1EhNHAmQ==","shasum":"dad667424cf3320ef89d203b51e2198ed17146b4","tarball":"http://registry-npm.ywwl.com/remark-lint-heading-whitespace/download/remark-lint-heading-whitespace-1.0.0.tgz","fileCount":11,"unpackedSize":114218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3Kl6N7frTjUOnLNR3S9Fqsh3GcWjD0mK4QP8SV5znsgIhAMwlRsbZZ2+h4sX/PIAEH78ZixeB3EaEcDnliiqNFNNz"}],"size":31355,"noattachment":false,"key":"/remark-lint-heading-whitespace/-/remark-lint-heading-whitespace-1.0.0.tgz"},"maintainers":[{"name":"vhf","email":"victor@draft.li"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-lint-heading-whitespace_1.0.0_1518117719502_0.508057298184698"},"_hasShrinkwrap":false,"publish_time":1518117720482,"_cnpm_publish_time":1518117720482}},"readme":"# remark-lint-heading-whitespace\n\nThis is a [remark-lint](https://github.com/wooorm/remark-lint) rule.\n\nOn some keyboards, for instance the default Swiss German keyboard layout `de_CH` [QWERTZ](https://en.wikipedia.org/wiki/QWERTZ) layout, the `#` symbol is obtained using `alt-3`. Because `alt-space` inserts a [non-breaking space](https://en.wikipedia.org/wiki/Non-breaking_space), it seems easy to insert `#<non-breaking space>` by mistake while writing Markdown heading `# title`.\n\nThis 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`:\n\n![Markdown](./a.png)\n\n![Preview](./b.png)\n\nThis `remark-lint` rule prevents this from ever happening by throwing an error whenever such situations are detected.\n\n## Using the rule\n\n### Via `.remarkrc`\n\n```bash\nnpm install -g remark-cli\nnpm install remark-lint remark-lint-heading-whitespace\n```\n\nThen, set up your `.remarkrc`:\n\n```JSON\n{\n  \"plugins\": [\n    \"lint\",\n    \"lint-heading-whitespace\"\n  ]\n}\n```\n\nNow you can use the following command to run the lint:\n\n```bash\nremark xxx.md\n```\n\n### Via CLI\n\n```bash\nnpm install -g remark-cli\nnpm install remark-lint remark-lint-heading-whitespace\nremark -u lint -u lint-heading-whitespace xxx.md\n```\n","_attachments":{},"homepage":"https://github.com/vhf/remark-lint-heading-whitespace#readme","bugs":{"url":"https://github.com/vhf/remark-lint-heading-whitespace/issues"},"license":"MIT"}