|
1 | | -# mdast-util-to-nlcst [](https://travis-ci.org/wooorm/mdast-util-to-nlcst) [](https://codecov.io/github/wooorm/mdast-util-to-nlcst) |
| 1 | +# mdast-util-to-nlcst [![Build Status][travis-badge]][travis] [![Coverage Status][coverage-badge]][coverage] |
2 | 2 |
|
3 | | -[**mdast**](https://github.com/wooorm/mdast) utility to transform markdown |
4 | | -into [**nlcst**](https://github.com/wooorm/nlcst), while keeping location |
| 3 | +[**mdast**][mdast] utility to transform markdown |
| 4 | +into [**nlcst**][nlcst], while keeping location |
5 | 5 | information intact. |
6 | 6 |
|
7 | 7 | In plain English: this enables natural-language tooling to read markdown as |
8 | 8 | input. |
9 | 9 |
|
10 | 10 | > **Note** You probably want to use |
11 | | -> [remark-retext](https://github.com/wooorm/remark-retext). |
| 11 | +> [remark-retext][]. |
12 | 12 |
|
13 | 13 | ## Installation |
14 | 14 |
|
15 | | -[npm](https://docs.npmjs.com/cli/install): |
| 15 | +[npm][npm-install]: |
16 | 16 |
|
17 | 17 | ```bash |
18 | 18 | npm install mdast-util-to-nlcst |
19 | 19 | ``` |
20 | 20 |
|
21 | | -**mdast-util-to-nlcst** is also available for [duo](http://duojs.org/#getting-started), |
22 | | -and as an AMD, CommonJS, and globals module, [uncompressed and compressed](https://github.com/wooorm/mdast-util-to-nlcst/releases). |
| 21 | +**mdast-util-to-nlcst** is also available for [duo][], |
| 22 | +and as an AMD, CommonJS, and globals module, |
| 23 | +[uncompressed and compressed][releases]. |
23 | 24 |
|
24 | 25 | ## Usage |
25 | 26 |
|
@@ -60,27 +61,68 @@ remark().process('Some *foo*s-_ball_.', function (err, file) { |
60 | 61 |
|
61 | 62 | ### toNLCST(file, Parser | parser) |
62 | 63 |
|
63 | | -Transform a by [**remark**](https://github.com/wooorm/remark) processed |
64 | | -[**virtual file**](https://github.com/wooorm/vfile) into an |
65 | | -[NLCST](https://github.com/wooorm/nlcst) tree for |
66 | | -[**retext**](https://github.com/wooorm/retext). |
| 64 | +Transform a by [**remark**][remark] processed |
| 65 | +[**virtual file**][vfile] into an |
| 66 | +[NLCST][nlcst] tree for |
| 67 | +[**retext**][retext]. |
67 | 68 |
|
68 | 69 | Parameters: |
69 | 70 |
|
70 | 71 | * `file` (`File`) |
71 | | - — [Virtual file](https://github.com/wooorm/vfile), must be passed through |
72 | | - [`parse()`](https://github.com/wooorm/remark/blob/master/doc/remark.3.md#remarkparsefile-options). |
| 72 | + — [Virtual file][vfile], must be passed through |
| 73 | + [`parse()`][remark-parse]. |
73 | 74 |
|
74 | 75 | * `parser` (`Function` or `Parser`, optional) |
75 | 76 | — You can pass the (constructor of) an NLCST parser, such as |
76 | | - [**parse-english**](https://github.com/wooorm/parse-english), |
77 | | - [**parse-dutch**](https://github.com/wooorm/parse-dutch), or |
78 | | - [**parse-latin**](https://github.com/wooorm/parse-latin). |
| 77 | + [**parse-english**][parse-english], [**parse-dutch**][parse-dutch], |
| 78 | + or [**parse-latin**][parse-latin]. |
79 | 79 |
|
80 | 80 | Returns: |
81 | 81 |
|
82 | | -[`NLCSTNode`](https://github.com/wooorm/nlcst). |
| 82 | +[`NLCSTNode`][nlcst-node]. |
83 | 83 |
|
84 | 84 | ## License |
85 | 85 |
|
86 | | -[MIT](LICENSE) © [Titus Wormer](http://wooorm.com) |
| 86 | +[MIT][license] © [Titus Wormer][home] |
| 87 | + |
| 88 | +<!-- Definitions --> |
| 89 | + |
| 90 | +[travis-badge]: https://img.shields.io/travis/wooorm/mdast-util-to-nlcst.svg |
| 91 | + |
| 92 | +[travis]: https://travis-ci.org/wooorm/mdast-util-to-nlcst |
| 93 | + |
| 94 | +[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/mdast-util-to-nlcst.svg |
| 95 | + |
| 96 | +[coverage]: https://codecov.io/github/wooorm/mdast-util-to-nlcst |
| 97 | + |
| 98 | +[vfile]: https://github.com/wooorm/vfile |
| 99 | + |
| 100 | +[remark]: https://github.com/wooorm/remark |
| 101 | + |
| 102 | +[retext]: https://github.com/wooorm/retext |
| 103 | + |
| 104 | +[mdast]: https://github.com/wooorm/mdast |
| 105 | + |
| 106 | +[nlcst]: https://github.com/wooorm/nlcst |
| 107 | + |
| 108 | +[remark-retext]: https://github.com/wooorm/remark-retext |
| 109 | + |
| 110 | +[npm-install]: https://docs.npmjs.com/cli/install |
| 111 | + |
| 112 | +[duo]: http://duojs.org/#getting-started |
| 113 | + |
| 114 | +[releases]: https://github.com/wooorm/mdast-util-to-nlcst/releases |
| 115 | + |
| 116 | +[remark-parse]: https://github.com/wooorm/remark/blob/master/doc/remark.3.md#remarkparsefile-options |
| 117 | + |
| 118 | +[nlcst-node]: https://github.com/wooorm/nlcst |
| 119 | + |
| 120 | +[parse-english]: https://github.com/wooorm/parse-english |
| 121 | + |
| 122 | +[parse-dutch]: https://github.com/wooorm/parse-dutch |
| 123 | + |
| 124 | +[parse-latin]: https://github.com/wooorm/parse-latin |
| 125 | + |
| 126 | +[license]: LICENSE |
| 127 | + |
| 128 | +[home]: http://wooorm.com |
0 commit comments