{"name":"remark-retext","version":"5.0.1","description":"remark plugin to support retext","license":"MIT","keywords":["unified","remark","remark-plugin","retext","plugin","mdast","markdown","nlcst","natural language","prose"],"repository":{"type":"git","url":"git+https://github.com/remarkjs/remark-retext.git"},"bugs":{"url":"https://github.com/remarkjs/remark-retext/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/mdast":"^3.0.0","@types/unist":"^2.0.0","mdast-util-to-nlcst":"^5.0.0","unified":"^10.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","prettier":"^2.0.0","remark-cli":"^10.0.0","remark-parse":"^10.0.0","remark-preset-wooorm":"^9.0.0","remark-stringify":"^10.0.0","retext-english":"^4.0.0","retext-stringify":"^3.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","xo":"^0.45.0"},"scripts":{"build":"rimraf \"lib/**/*.d.ts\" \"*.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true,"#":"needed `any`s","ignoreFiles":["lib/index.d.ts","lib/index.js"]},"gitHead":"27b7d19e39e7db345ed5332674644edce80589e5","homepage":"https://github.com/remarkjs/remark-retext#readme","_id":"remark-retext@5.0.1","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"integrity":"sha512-h3kOjKNy7oJfohqXlKp+W4YDigHD3rw01x91qvQP/cUkK5nJrDl6yEYwTujQCAXSLZrsBxywlK3ntzIX6c29aA==","shasum":"f19817f21d54bb273a0efc2007458ac38dd42542","tarball":"http://registry-npm.ywwl.com/remark-retext/download/remark-retext-5.0.1.tgz","fileCount":7,"unpackedSize":16809,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh25pDCRA9TVsSAnZWagAAym4P/21lQf65MHt89V2YsMMn\njkveBuWuE4mRJEVt+ayJvRxp2lQugKMiOAkJzf4qKT9IF089Nhq2t2iN2Lwo\nJRTN3Sknt7F2KlvFEgEYXX6tf2HHpI5U5NmMZoLhbhrRE2IIg0fsjBVxCAG/\nwQhg/Ex7BBRpqUjPylgq6BEpmybCxhf+op5owovWIBbAMFaaNWwW5hfZz14M\n8kFGE0ZF8bReD+AxOX0xlAg7VCrgbeRAtes9GK7JVsKlo1KIhcLHs5lqM2C9\nYdvfUfUxNO6vG2X7TZD2i8hMCtOpFI2BafIK3duhgRCtJxU0SjRYlxKSD+OM\nqqOxl4DS0EPx+KkCYhLnHv3peGMKtIelpTU3M+AvvHFRj748bWHoIt4qVa9+\nSnzojk/YWuBcE5MX3740NEGW+no/J8ZHi0mohW3XyMHIYp17RNVWmUET9gjB\nA8zYq2u+UpNJFvQR8pT2Wh0i41eZRFjvR5ToC4MrGromVQd9cyjMrwYL2myG\nE7ryCotlOuwEosYVklQ0vuxi9jkKyEndj0+Dkjud9xswceKMtFrrHBXVsn+v\nkcZmiiBZ6UqamXapJa+PV2j+f+cVkaNG8xADCEebhLXTA6a2FfjkQ4K2EQy+\nRxCFDU6p1RkNapzmCHJd2om2j+f8Q/lEZ7Q9IrEQAedkvF79PMZvyh9G5u2y\nErCb\r\n=pxFZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGZfFav/XWB+rs503Dn2DwSwxYi7Yh0FwwiHyZIo+JQ4AiEAm6hGsm201lL9fk/L136SFw1TZS821GHiroCtQWI3HQA="}],"size":5574,"noattachment":false,"key":"/remark-retext/-/remark-retext-5.0.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-retext_5.0.1_1635582550176_0.3471007460641493"},"_hasShrinkwrap":false,"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":1635582550335,"_cnpm_publish_time":1635582550335,"dist-tags":{"latest":"6.0.1"}}