Warn when the mdash style violate a given style.
Options: '―'
, '-'
, '--'
, default: '―'
.
This rule is not included in any default preset
`remark-lint` ― powerful Markdown processor powered by plugins.
No messages.
`remark-lint` - powerful Markdown processor powered by plugins.
`remark-lint` -- powerful Markdown processor powered by plugins.
1:1-1:64: Use `―` instead of `-` for mdash
3:1-3:65: Use `―` instead of `--` for mdash
When configured with '-'
.
`remark-lint` - powerful Markdown processor powered by plugins.
No messages.
When configured with '--'
.
`remark-lint` -- powerful Markdown processor powered by plugins.
No messages.
[npm][]:
npm install remark-lint-mdash-style
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));
});