Skip to content

Instantly share code, notes, and snippets.

@spl
Last active June 15, 2020 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spl/e66f5803a165263886410e42c9d85358 to your computer and use it in GitHub Desktop.
Save spl/e66f5803a165263886410e42c9d85358 to your computer and use it in GitHub Desktop.
remark, retext, spell with autolinks
// Demonstration of https://github.com/remarkjs/remark-retext/issues/13
'use strict'
const unified = require('unified')
unified()
.use(require('remark-parse'))
.use(
require('remark-retext'),
unified()
.use(require('retext-english'))
.use(require('retext-syntax-urls'))
.use(require('retext-spell'), {dictionary: require('dictionary-en')})
)
.use(require('remark-stringify'))
.process('<https://blueoakcouncil.org/license/1.0.0>', (err, file) => {
console.error(require('vfile-reporter')(err || file))
})
{
"name": "remark-retext-spell-autolink",
"version": "0.0.1",
"license": "BlueOak-1.0.0",
"files": [
"index.js"
],
"dependencies": {
"dictionary-en": "3.0.0",
"remark-parse": "8.0.2",
"remark-retext": "4.0.0",
"remark-stringify": "8.1.0",
"retext-english": "3.0.4",
"retext-spell": "4.0.0",
"retext-syntax-urls": "2.0.0",
"unified": "9.0.0",
"vfile-reporter": "6.0.1"
}
}
@spl
Copy link
Author

spl commented Jun 15, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment