npm install remark-retext
Say we have the following file,
## Hello guys!
And our script,
example.js, looks as follows:
var vfile =var report =var unified =var parse =var stringify =var remark2retext =var english =var equality =
node example yields:
example.md1:10-1:14 warning `guys` may be insensitive, use `people`, `persons`, `folks` instead gals-men retext-equality⚠ 1 warning
origin.use(remark2retext, destination[, options])
destination is either a parser or a processor.
Unified processor is given, runs the destination processor
with the new nlcst tree, then, after running discards that tree and continues on
running the origin processor with the original tree (bridge mode).
rehype-retext— Transform HTML (hast) to natural language (nlcst)
remark-rehype— Transform Markdown (mdast) to HTML (hast)
rehype-remark— Transform HTML (hast) to Markdown (mdast)
mdast-util-to-nlcst— Underlying algorithm
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.