remark-lint-mdash-style
rule for remark-lint to handle mdash style
Last updated 2 years ago by alexandrtovmach .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install remark-lint-mdash-style 
SYNC missed versions from official npm registry.

remark-lint-mdash-style npm version npm bundle size

Warn when the mdash style violate a given style.

Options: '―', '-', '--', default: '―'.

Presets

This rule is not included in any default preset

Example

valid.md
In
`remark-lint` ― powerful Markdown processor powered by plugins.
Out

No messages.

invalid.md
In
`remark-lint` - powerful Markdown processor powered by plugins.

`remark-lint` -- powerful Markdown processor powered by plugins.
Out
1:1-1:64: Use `―` instead of `-` for mdash
3:1-3:65: Use `―` instead of `--` for mdash
valid.md

When configured with '-'.

In
`remark-lint` - powerful Markdown processor powered by plugins.
Out

No messages.

valid.md

When configured with '--'.

In
`remark-lint` -- powerful Markdown processor powered by plugins.
Out

No messages.

Install

[npm][]:

npm install remark-lint-mdash-style

Use

You probably want to use it on the CLI through a config file:

 ...
 "remarkConfig": {
   "plugins": [
     ...
     "lint",
+    "lint-mdash-style",
     ...
   ]
 }
 ...

Or use it on the CLI directly

remark -u lint -u lint-mdash-style readme.md

Or use this on the API:

 var remark = require('remark');
 var report = require('vfile-reporter');

 remark()
   .use(require('remark-lint'))
+  .use(require('remark-lint-mdash-style'))
   .process('_Emphasis_ and **importance**', function (err, file) {
     console.error(report(err || file));
   });

Current Tags

  • 1.1.1                                ...           latest (2 years ago)

3 Versions

  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Total 70
Today 0
This Week 3
This Month 3
Last Day 0
Last Week 0
Last Month 4
Dependencies (4)
Dev Dependencies (2)
Dependents (1)

Copyright 2014 - 2021 © npmmirror.com |