{"name":"remark-retext","version":"3.1.2","description":"retext support for remark","license":"MIT","keywords":["remark","retext","mdast","nlcst"],"repository":{"type":"git","url":"git+https://github.com/remarkjs/remark-retext.git"},"bugs":{"url":"https://github.com/remarkjs/remark-retext/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{"mdast-util-to-nlcst":"^3.2.0"},"devDependencies":{"browserify":"^16.0.0","nyc":"^13.0.0","prettier":"^1.14.2","remark-cli":"^6.0.0","remark-parse":"^6.0.0","remark-preset-wooorm":"^4.0.0","remark-stringify":"^6.0.0","retext-english":"^3.0.0","retext-stringify":"^2.0.0","tape":"^4.0.0","tinyify":"^2.4.3","unified":"^7.0.0","xo":"^0.22.0"},"scripts":{"format":"remark . -qfo && prettier --write \"**/*.js\" && xo --fix","build-bundle":"browserify . -s remarkRetext > remark-retext.js","build-mangle":"browserify . -s remarkRetext -p tinyify > remark-retext.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run build && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"ignores":["remark-retext.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"08db08efc0d1c8319b84f16246edbe9c82fcc78b","homepage":"https://github.com/remarkjs/remark-retext#readme","_id":"remark-retext@3.1.2","_npmVersion":"6.4.1","_nodeVersion":"11.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"integrity":"sha512-+48KzJdSXvsPupY5pj5AY7oBUSiDOqFPZBKebX5WemrMyIG+RImIt9hgeqelluVDd1kooHen33K/aybTPyoI9g==","shasum":"983003d7495cf9198aa450c5ae5a7737011eec5f","tarball":"http://registry-npm.ywwl.com/remark-retext/download/remark-retext-3.1.2.tgz","fileCount":4,"unpackedSize":8198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9GouCRA9TVsSAnZWagAA560P+wbsKfXKTOuc4ysVk9w/\nJqmuZwm6yxFm5HmsCnhQtFiz0fU3lfx1Xx9xX7p7o9sfBxdasvr/DSIz3M6Y\n4c/StMxbYMKx8CGtrb028eBG8g5m1zhLneD0OHM2r8BWc8tDBAOBBknKSey0\nZ9nA445UT7G0TRnHm0HZdlNoMP68dtBKmdvjKL9YLhC99zyJ/CT4x11cbg7c\nAurq0qdjPd/lHkfXSMTxnPwg5pyFD1zxDfnkIlqfHIwPmVPEGdmbJwge1iuj\nrKZO+H7IXgwutc5K+ANrFknySN/KW4pK+eyrMsC6ExmZTT+PPGiFz66N1RdU\nOy010hFReH3iHmDS+NYcPun/IEw2/iERwDDerW5b7/CVFac91jW/NseigipG\nsXixocK2S4wpNXbEZQ48Y29bhgdilcPXGobyKRewZajEguJQKutHrQ0aX9EE\nEtb+myf+rk7GnX6cEbVAMSbpIaN2+c6MZJwkYtGFLb9SRoRHqqBd76+LNy1b\nEQWosaL+XZHIZIFndiDMonOH3NbSdsWD+2qpIYX2Q9SEXCrCMDP7iXCVplJi\npvqlvbUQPPuA0skWNrg6ChcXI9jYjrBrg4sAzrEbwxvMVVxxW8xiZHgBV7Lm\nWKAVX/vepUCkRenp4mbwLdHVsazeDQI68puv7sWryTbfIDtq69Ctc6YCmw/D\nOtTh\r\n=9tUw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICox2a7KeNShW4NG95R8AoWOLq1b2loSphbHeQrZ5QR9AiEAoElNOOxBnQz9eRSIZUElLKOmCTrsvQNLNAANMaQyVMs="}],"size":3334,"noattachment":false,"key":"/remark-retext/-/remark-retext-3.1.2.tgz"},"maintainers":[{"email":"Christian.Murphy.42@gmail.com","name":"christianmurphy"},{"email":"denysdovhan@gmail.com","name":"denysdovhan"},{"email":"eush77@gmail.com","name":"eush77"},{"email":"fazouanem3@gmail.com","name":"fazouane-marouane"},{"email":"david@spektrakel.de","name":"haggis_"},{"email":"johnotander@gmail.com","name":"johno"},{"email":"merlijn@soverin.net","name":"murderlon"},{"email":"lin90162@yahoo.co.jp","name":"rhysd"},{"email":"fluke8259@gmail.com","name":"rokt33r"},{"email":"sethvincent@gmail.com","name":"sethvincent"},{"email":"victor@draft.li","name":"vhf"},{"email":"tituswormer@gmail.com","name":"wooorm"},{"email":"xuopled@gmail.com","name":"xuopled"},{"email":"zeke@sikelianos.com","name":"zeke"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remark-retext_3.1.2_1542744621817_0.9780284357859317"},"_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":1542744621911,"_cnpm_publish_time":1542744621911,"dist-tags":{"latest":"6.0.1"}}