remark-retext
Advanced tools
Comparing version 3.1.2 to 3.1.3
17
index.js
@@ -7,7 +7,7 @@ 'use strict' | ||
/* Attacher. | ||
* If a destination processor is given, runs the destination | ||
* with the new NLCST tree (bridge-mode). | ||
* If a parser is given, returns the NLCST tree: further | ||
* plug-ins run on that tree (mutate-mode). */ | ||
// Attacher. | ||
// If a destination processor is given, runs the destination with the new nlcst | ||
// tree (bridge mode). | ||
// If a parser is given, returns the nlcst tree: further plugins run on that | ||
// tree (mutate mode). | ||
function remark2retext(destination, options) { | ||
@@ -18,3 +18,4 @@ var fn = destination && destination.run ? bridge : mutate | ||
/* Mutate-mode. Further transformers run on the NLCST tree. */ | ||
// Mutate mode. | ||
// Further transformers run on the nlcst tree. | ||
function mutate(parser, options) { | ||
@@ -27,4 +28,4 @@ return transformer | ||
/* Bridge-mode. Runs the destination with the new NLCST | ||
* tree. */ | ||
// Bridge mode. | ||
// Runs the destination with the new nlcst tree. | ||
function bridge(destination, options) { | ||
@@ -31,0 +32,0 @@ return transformer |
{ | ||
"name": "remark-retext", | ||
"version": "3.1.2", | ||
"description": "retext support for remark", | ||
"version": "3.1.3", | ||
"description": "remark plugin to transform to retext", | ||
"license": "MIT", | ||
"keywords": [ | ||
"unified", | ||
"remark", | ||
"retext", | ||
"plugin", | ||
"mdast", | ||
"nlcst" | ||
"markdown", | ||
"nlcst", | ||
"natural language", | ||
"prose" | ||
], | ||
@@ -26,7 +31,7 @@ "repository": "remarkjs/remark-retext", | ||
"browserify": "^16.0.0", | ||
"nyc": "^13.0.0", | ||
"prettier": "^1.14.2", | ||
"nyc": "^14.0.0", | ||
"prettier": "^1.0.0", | ||
"remark-cli": "^6.0.0", | ||
"remark-parse": "^6.0.0", | ||
"remark-preset-wooorm": "^4.0.0", | ||
"remark-preset-wooorm": "^5.0.0", | ||
"remark-stringify": "^6.0.0", | ||
@@ -36,5 +41,5 @@ "retext-english": "^3.0.0", | ||
"tape": "^4.0.0", | ||
"tinyify": "^2.4.3", | ||
"tinyify": "^2.0.0", | ||
"unified": "^7.0.0", | ||
"xo": "^0.22.0" | ||
"xo": "^0.24.0" | ||
}, | ||
@@ -41,0 +46,0 @@ "scripts": { |
@@ -6,17 +6,18 @@ # remark-retext | ||
[![Downloads][downloads-badge]][downloads] | ||
[![Chat][chat-badge]][chat] | ||
[![Size][size-badge]][size] | ||
[![Sponsors][sponsors-badge]][collective] | ||
[![Backers][backers-badge]][collective] | ||
[![Chat][chat-badge]][chat] | ||
Bridge / mutate from [**remark**][remark] to [**retext**][retext]. | ||
[**remark**][remark] plugin to bridge or mutate to [**retext**][retext]. | ||
## Installation | ||
## Install | ||
[npm][]: | ||
```bash | ||
```sh | ||
npm install remark-retext | ||
``` | ||
## Usage | ||
## Use | ||
@@ -31,3 +32,3 @@ Say we have the following file, `example.md`: | ||
```javascript | ||
```js | ||
var vfile = require('to-vfile') | ||
@@ -69,4 +70,4 @@ var report = require('vfile-reporter') | ||
Either bridge or mutate from [**remark**][remark] ([MDAST][]) to | ||
[**retext**][retext] ([NLCST][]). | ||
[**remark**][remark] ([**mdast**][mdast]) plugin to bridge or mutate to | ||
[**retext**][retext] ([**nlcst**][nlcst]). | ||
@@ -77,10 +78,9 @@ ###### `destination` | ||
If a [`Unified`][processor] 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][bridge]). | ||
If a [`Unified`][processor] 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*][bridge]). | ||
If a parser (such as [**parse-latin**][latin], [**parse-english**][english], | ||
or [**parse-dutch**][dutch]) is given, passes the tree to further | ||
plug-ins (mutate-mode). | ||
If a parser (such as [`parse-latin`][latin], [`parse-english`][english], or | ||
[`parse-dutch`][dutch]) is given, passes the tree to further plugins | ||
(*mutate mode*). | ||
@@ -94,7 +94,7 @@ ###### `options` | ||
* [`rehype-retext`](https://github.com/rehypejs/rehype-retext) | ||
— Transform HTML to [NLCST][] | ||
— Transform HTML ([hast][]) to natural language [nlcst][] | ||
* [`remark-rehype`](https://github.com/remarkjs/remark-rehype) | ||
— Transform markdown to HTML | ||
— Transform Markdown ([mdast][]) to HTML ([hast][]) | ||
* [`rehype-remark`](https://github.com/rehypejs/rehype-remark) | ||
— Transform HTML to markdown | ||
— Transform HTML ([hast][]) to Markdown ([mdast][]) | ||
* [`mdast-util-to-nlcst`][to-nlcst] | ||
@@ -105,7 +105,9 @@ — Underlying algorithm | ||
See [`contributing.md` in `remarkjs/remark`][contributing] for ways to get | ||
started. | ||
See [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways | ||
to get started. | ||
See [`support.md`][support] for ways to get help. | ||
This organisation has a [Code of Conduct][coc]. By interacting with this | ||
repository, organisation, or community you agree to abide by its terms. | ||
This project has a [Code of Conduct][coc]. | ||
By interacting with this repository, organisation, or community you agree to | ||
abide by its terms. | ||
@@ -118,3 +120,3 @@ ## License | ||
[build-badge]: https://img.shields.io/travis/remarkjs/remark-retext.svg | ||
[build-badge]: https://img.shields.io/travis/remarkjs/remark-retext/master.svg | ||
@@ -131,5 +133,5 @@ [build]: https://travis-ci.org/remarkjs/remark-retext | ||
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg | ||
[size-badge]: https://img.shields.io/bundlephobia/minzip/remark-retext.svg | ||
[chat]: https://spectrum.chat/unified/remark | ||
[size]: https://bundlephobia.com/result?p=remark-retext | ||
@@ -142,4 +144,16 @@ [sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg | ||
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg | ||
[chat]: https://spectrum.chat/unified/remark | ||
[npm]: https://docs.npmjs.com/cli/install | ||
[health]: https://github.com/remarkjs/.github | ||
[contributing]: https://github.com/remarkjs/.github/blob/master/contributing.md | ||
[support]: https://github.com/remarkjs/.github/blob/master/support.md | ||
[coc]: https://github.com/remarkjs/.github/blob/master/code-of-conduct.md | ||
[license]: license | ||
@@ -149,4 +163,2 @@ | ||
[mdast]: https://github.com/syntax-tree/mdast | ||
[remark]: https://github.com/remarkjs/remark | ||
@@ -160,4 +172,8 @@ | ||
[mdast]: https://github.com/syntax-tree/mdast | ||
[nlcst]: https://github.com/syntax-tree/nlcst | ||
[hast]: https://github.com/syntax-tree/hast | ||
[latin]: https://github.com/wooorm/parse-latin | ||
@@ -170,5 +186,1 @@ | ||
[to-nlcst]: https://github.com/syntax-tree/mdast-util-to-nlcst | ||
[contributing]: https://github.com/remarkjs/remark/blob/master/contributing.md | ||
[coc]: https://github.com/remarkjs/remark/blob/master/code-of-conduct.md |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8745
33
175