{"name":"remark-retext","version":"2.0.0","description":"retext support for remark","license":"MIT","keywords":["remark","retext","mdast","nlcst"],"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/wooorm/remark-retext.git"},"bugs":{"url":"https://github.com/wooorm/remark-retext/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"dependencies":{"mdast-util-to-nlcst":"^3.0.0"},"devDependencies":{"browserify":"^13.0.1","eslint":"^2.0.0","esmangle":"^1.0.1","istanbul":"^0.4.0","jscs":"^3.0.0","jscs-jsdoc":"^2.0.0","remark-cli":"^1.0.0","remark-comment-config":"^4.0.0","remark-github":"^5.0.0","remark-lint":"^4.0.0","remark-parse":"^1.0.0","remark-stringify":"^1.0.0","remark-validate-links":"^4.0.0","retext-english":"^2.0.0","retext-equality":"^2.3.0","retext-stringify":"^1.0.0","tape":"^4.0.0","unified":"^4.1.2","vfile-reporter":"^1.5.0"},"scripts":{"build-md":"remark . --quiet --frail","build-bundle":"browserify index.js --bare -s remarkRetext > remark-retext.js","build-mangle":"esmangle remark-retext.js > remark-retext.min.js","build":"npm run build-md && npm run build-bundle && npm run build-mangle","lint-api":"eslint .","lint-style":"jscs --reporter inline .","lint":"npm run lint-api && npm run lint-style","test-api":"node test.js","test-coverage":"istanbul cover test.js","test":"npm run build && npm run lint && npm run test-coverage"},"gitHead":"535bc604e36e7ccb9368c7338b669a95a422be6c","homepage":"https://github.com/wooorm/remark-retext#readme","_id":"remark-retext@2.0.0","_shasum":"1039f032a346b2ab4778490820a7a68ca6f4d859","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"1039f032a346b2ab4778490820a7a68ca6f4d859","tarball":"http://registry-npm.ywwl.com/remark-retext/download/remark-retext-2.0.0.tgz","integrity":"sha512-7bsdsSmraCF9WJQNB+/OqgrWTy8lWwoKt+e4/ER2VFIzta7cADOWFk79JaEcZLeAuJMAtxrOpLxVhUyJ8oGBzA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICt7jMO3ax4ZLnVV4boKGk2OXb+l/fDuEcwRCiIxOp5YAiEA2g5wE2exzmfh7KxRtFglwQQ/kWvlv5UZD23AdnCdmP4="}],"size":3307,"noattachment":false,"key":"/remark-retext/-/remark-retext-2.0.0.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/remark-retext-2.0.0.tgz_1466614398122_0.6422776454128325"},"directories":{},"readme":"# remark-retext\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n**[remark][]** plugin to support **[retext][]**.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`unified().use(remarkRetext, destination[, options])`](#unifieduseremarkretext-destination-options)\n    *   [`Options`](#options)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a [unified][] ([remark][]) plugin to support [retext][].\n\n## When should I use this?\n\nThis project is useful if you want to check natural language in markdown.\nThe retext ecosystem has many useful plugins to check prose, such as\n[`retext-indefinite-article`][retext-indefinite-article] which checks that `a`\nand `an` are used correctly, or [`retext-readability`][retext-readability] which\nchecks that sentences are not too complex.\nThis plugins lets you use them on markdown documents.\n\nThis plugin is not able to apply changes by retext plugins (such\nas done by `retext-smartypants`) to the markdown content.\n\nThis plugin is built on [`mdast-util-to-nlcst`][mdast-util-to-nlcst], which does\nthe work on syntax trees.\nremark focusses on making it easier to transform content by abstracting such\ninternals away.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install remark-retext\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport remarkRetext from 'https://esm.sh/remark-retext@6'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import remarkRetext from 'https://esm.sh/remark-retext@6?bundle'\n</script>\n```\n\n## Use\n\nSay we have the following file `example.md`:\n\n```markdown\n## Hello guys!\n```\n\n…and a module `example.js`:\n\n```js\nimport remarkParse from 'remark-parse'\nimport remarkRetext from 'remark-retext'\nimport remarkStringify from 'remark-stringify'\nimport retextEnglish from 'retext-english'\nimport retextEquality from 'retext-equality'\nimport {read} from 'to-vfile'\nimport {unified} from 'unified'\nimport {reporter} from 'vfile-reporter'\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkRetext, unified().use(retextEnglish).use(retextEquality))\n  .use(remarkStringify)\n  .process(await read('example.md'))\n\nconsole.error(reporter(file))\n```\n\n…then running `node example.js` yields:\n\n```text\nexample.md\n1:10-1:14 warning Unexpected potentially insensitive use of `guys`, in somes cases `people`, `persons`, `folks` may be better gals-man retext-equality\n\n⚠ 1 warning\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is [`remarkRetext`][api-remark-retext].\n\n### `unified().use(remarkRetext, destination[, options])`\n\nBridge or mutate to retext.\n\n###### Parameters\n\n*   `destination` ([`Parser`][unified-parser] or\n    [`Processor`][unified-processor])\n    — configuration (required)\n\n###### Returns\n\nTransform ([`Transformer`][unified-transformer]).\n\n###### Notes\n\n*   if a [processor][unified-processor] is given, uses its parser to create a\n    new nlcst tree, then runs the plugins attached to with that\n    (*[bridge mode][unified-mode]*); you can add a parser to processor for\n    example with `retext-english`; other plugins used on the processor should\n    be retext plugins\n*   if a [parser][unified-parser] is given, uses it to create a new nlcst tree,\n    and returns it (*[mutate mode][unified-mode]*); you can get a parser by\n    importing `Parser` from `retext-english` for example;  other plugins used\n    after `remarkRetext` should be retext plugins\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n###### Fields\n\n*   `options.ignore` (`Array<string>`, optional)\n    — list of [mdast][] node types to ignore;\n    the types `'table'`, `'tableRow'`, and `'tableCell'` are always ignored\n*   `options.source` (`Array<string>`, optional)\n    — list of [mdast][] node types to mark as [nlcst][] source nodes;\n    the type `'inlineCode'` is always marked as source\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional type [`Options`][api-options].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `remark-retext@^6`,\ncompatible with Node.js 16.\n\nThis plugin works with `unified` version 6+, `remark` version 3+, and `retext`\nversion 7+.\n\n## Security\n\nUse of `remark-retext` does not involve **[rehype][]** (**[hast][]**) or user\ncontent so there are no openings for [cross-site scripting (XSS)][wiki-xss]\nattacks.\n\n## Related\n\n*   [`rehype-retext`](https://github.com/rehypejs/rehype-retext)\n    — transform HTML ([hast][]) to natural language ([nlcst][])\n*   [`remark-rehype`](https://github.com/remarkjs/remark-rehype)\n    — transform Markdown ([mdast][]) to HTML ([hast][])\n*   [`rehype-remark`](https://github.com/rehypejs/rehype-remark)\n    — transform HTML ([hast][]) to Markdown ([mdast][])\n*   [`mdast-util-to-nlcst`][mdast-util-to-nlcst]\n    — underlying algorithm\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/remarkjs/remark-retext/workflows/main/badge.svg\n\n[build]: https://github.com/remarkjs/remark-retext/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark-retext.svg\n\n[coverage]: https://codecov.io/github/remarkjs/remark-retext\n\n[downloads-badge]: https://img.shields.io/npm/dm/remark-retext.svg\n\n[downloads]: https://www.npmjs.com/package/remark-retext\n\n[size-badge]: https://img.shields.io/bundlejs/size/remark-retext\n\n[size]: https://bundlejs.com/?q=remark-retext\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/remarkjs/remark/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[health]: https://github.com/remarkjs/.github\n\n[contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md\n\n[support]: https://github.com/remarkjs/.github/blob/main/support.md\n\n[coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[hast]: https://github.com/syntax-tree/hast\n\n[mdast]: https://github.com/syntax-tree/mdast\n\n[mdast-util-to-nlcst]: https://github.com/syntax-tree/mdast-util-to-nlcst\n\n[nlcst]: https://github.com/syntax-tree/nlcst\n\n[rehype]: https://github.com/rehypejs/rehype\n\n[remark]: https://github.com/remarkjs/remark\n\n[retext]: https://github.com/retextjs/retext\n\n[retext-indefinite-article]: https://github.com/retextjs/retext-indefinite-article\n\n[retext-readability]: https://github.com/retextjs/retext-readability\n\n[typescript]: https://www.typescriptlang.org\n\n[unified]: https://github.com/unifiedjs/unified\n\n[unified-mode]: https://github.com/unifiedjs/unified#processing-between-syntaxes\n\n[unified-processor]: https://github.com/unifiedjs/unified#processor\n\n[unified-parser]: https://github.com/unifiedjs/unified#parser\n\n[unified-transformer]: https://github.com/unifiedjs/unified#transformer\n\n[wiki-xss]: https://en.wikipedia.org/wiki/Cross-site_scripting\n\n[api-options]: #options\n\n[api-remark-retext]: #unifieduseremarkretext-destination-options\n","publish_time":1466614400521,"_cnpm_publish_time":1466614400521,"dist-tags":{"latest":"6.0.1"}}