8
8
[ ![ Backers] [ backers-badge ]] [ collective ]
9
9
[ ![ Chat] [ chat-badge ]] [ chat ]
10
10
11
- Transform [ MDAST ] [ ] to [ NLCST ] [ ] .
11
+ [ ** mdast ** ] [ mdast ] utility to transform to [ ** nlcst ** ] [ nlcst ] .
12
12
13
13
> ** Note** : You probably want to use [ ` remark-retext ` ] [ remark-retext ] .
14
14
15
- ## Installation
15
+ ## Install
16
16
17
17
[ npm] [ ] :
18
18
19
- ``` bash
19
+ ``` sh
20
20
npm install mdast-util-to-nlcst
21
21
```
22
22
23
23
## Usage
24
24
25
- ``` javascript
25
+ ``` js
26
26
var toNLCST = require (' mdast-util-to-nlcst' )
27
27
var inspect = require (' unist-util-inspect' )
28
28
var English = require (' parse-english' )
@@ -54,50 +54,50 @@ RootNode[1] (1:1-1:17, 0-16)
54
54
55
55
## API
56
56
57
- ### ` toNLCST(node , file, Parser[, options])`
57
+ ### ` toNlcst(tree , file, Parser[, options])`
58
58
59
- Transform an [ MDAST ] [ ] syntax tree and corresponding [ virtual file] [ vfile ]
60
- into an [ NLCST ] [ ] tree .
59
+ Transform a [ tree ] [ ] in [ mdast ] [ ] , with a corresponding [ virtual file] [ vfile ] ,
60
+ into [ nlcst ] [ ] .
61
61
62
62
##### Parameters
63
63
64
64
###### ` node `
65
65
66
- Syntax tree, with positional information ([ ` MDASTNode ` ] [ mdast ] ).
66
+ Tree in [ mdast ] [ ] with positional information ([ ` MdastNode ` ] [ mdastnode ] ).
67
67
68
68
###### ` file `
69
69
70
70
Virtual file ([ ` VFile ` ] [ vfile ] ).
71
71
72
72
###### ` parser `
73
73
74
- Constructor of an NLCST parser (` Function ` ). For example,
75
- [ ` parse-english ` ] [ english ] , [ ` parse-dutch ` ] [ dutch ] , or
74
+ [ nlcst ] [ ] parser (` Function ` ).
75
+ For example, [ ` parse-english ` ] [ english ] , [ ` parse-dutch ` ] [ dutch ] , or
76
76
[ ` parse-latin ` ] [ latin ] .
77
77
78
78
###### ` options.ignore `
79
79
80
- List of node [ types] [ type ] to ignore (` Array.<string> ` ).
80
+ List of [ types] [ type ] to ignore (` Array.<string> ` ).
81
81
82
82
` 'table' ` , ` 'tableRow' ` , and ` 'tableCell' ` are always ignored.
83
83
84
84
###### ` options.source `
85
85
86
- List of node [ types] [ type ] to mark as [ source] [ ] (` Array.<string> ` ).
86
+ List of [ types] [ type ] to mark as [ source] [ ] (` Array.<string> ` ).
87
87
88
88
` 'inlineCode' ` is always marked as source.
89
89
90
90
##### Returns
91
91
92
- [ ` NLCSTNode ` ] [ nlcst ] .
92
+ [ ` NlcstNode ` ] [ nlcstnode ] .
93
93
94
94
##### Examples
95
95
96
96
###### ` ignore `
97
97
98
98
Say we have the following file ` example.md ` :
99
99
100
- ``` markdown
100
+ ``` md
101
101
A paragraph.
102
102
103
103
> A paragraph in a block quote.
@@ -122,7 +122,7 @@ RootNode[2] (1:1-3:1, 0-14)
122
122
123
123
Say we have the following file ` example.md ` :
124
124
125
- ``` markdown
125
+ ``` md
126
126
A paragraph.
127
127
128
128
> A paragraph in a block quote.
@@ -151,19 +151,21 @@ RootNode[3] (1:1-3:32, 0-45)
151
151
* [ ` remark-retext ` ] [ remark-retext ]
152
152
— ** retext** support for ** remark**
153
153
* [ ` hast-util-to-nlcst ` ] ( https://github.com/syntax-tree/hast-util-to-nlcst )
154
- — Transform HAST to NLCST
154
+ — Transform [ hast ] [ ] to [ nlcst ] [ ]
155
155
* [ ` hast-util-to-mdast ` ] ( https://github.com/syntax-tree/hast-util-to-mdast )
156
- — Transform HAST to MDAST
156
+ — Transform [ hast ] [ ] to [ mdast ] [ ]
157
157
* [ ` mdast-util-to-hast ` ] ( https://github.com/syntax-tree/mdast-util-to-hast )
158
- — Transform MDAST to HAST
158
+ — Transform [ mdast ] [ ] to [ hast ] [ ]
159
159
160
160
## Contribute
161
161
162
- See [ ` contributing.md ` in ` syntax-tree/mdast ` ] [ contributing ] for ways to get
162
+ See [ ` contributing.md ` in ` syntax-tree/.github ` ] [ contributing ] for ways to get
163
163
started.
164
+ See [ ` support.md ` ] [ support ] for ways to get help.
164
165
165
- This organisation has a [ Code of Conduct] [ coc ] . By interacting with this
166
- repository, organisation, or community you agree to abide by its terms.
166
+ This project has a [ Code of Conduct] [ coc ] .
167
+ By interacting with this repository, organisation, or community you agree to
168
+ abide by its terms.
167
169
168
170
## License
169
171
@@ -203,10 +205,18 @@ repository, organisation, or community you agree to abide by its terms.
203
205
204
206
[ author ] : https://wooorm.com
205
207
208
+ [ contributing ] : https://github.com/syntax-tree/.github/blob/master/contributing.md
209
+
210
+ [ support ] : https://github.com/syntax-tree/.github/blob/master/support.md
211
+
212
+ [ coc ] : https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
213
+
206
214
[ mdast ] : https://github.com/syntax-tree/mdast
207
215
208
216
[ nlcst ] : https://github.com/syntax-tree/nlcst
209
217
218
+ [ hast ] : https://github.com/syntax-tree/hast
219
+
210
220
[ remark-retext ] : https://github.com/remarkjs/remark-retext
211
221
212
222
[ vfile ] : https://github.com/vfile/vfile
@@ -221,6 +231,8 @@ repository, organisation, or community you agree to abide by its terms.
221
231
222
232
[ source ] : https://github.com/syntax-tree/nlcst#source
223
233
224
- [ contributing ] : https://github.com/syntax-tree/mdast/blob/master/contributing.md
234
+ [ tree ] : https://github.com/syntax-tree/unist#tree
235
+
236
+ [ mdastnode ] : https://github.com/syntax-tree/mdast#nodes
225
237
226
- [ coc ] : https://github.com/syntax-tree/mdast/blob/master/code-of-conduct.md
238
+ [ nlcstnode ] : https://github.com/syntax-tree/nlcst#nodes
0 commit comments