Skip to content

Commit c1dfd06

Browse files
committed
Update dev-dependencies
1 parent e7ec8df commit c1dfd06

File tree

2 files changed

+71
-71
lines changed

2 files changed

+71
-71
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"Christian Murphy <[email protected]>"
1515
],
1616
"devDependencies": {
17-
"remark-cli": "^5.0.0",
18-
"remark-preset-wooorm": "^4.0.0"
17+
"remark-cli": "^6.0.0",
18+
"remark-preset-wooorm": "^5.0.0"
1919
},
2020
"scripts": {
2121
"format": "remark . -qfo",

readme.md

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ unist relates to the [unified][], [remark][], [rehype][], and [retext][]
7878
projects in that unist syntax trees are used throughout their ecosystems.
7979

8080
unist relates to the [vfile][] project in that it accepts unist nodes for
81-
its message store, and that vfile can be a source [_file_][term-file] of a
81+
its message store, and that vfile can be a source [*file*][term-file] of a
8282
syntax tree.
8383

8484
## Nodes
@@ -97,7 +97,7 @@ interface Node {
9797
```
9898

9999
The `type` field is a non-empty string representing the variant of a node.
100-
This field can be used to determine the [_type_][term-type] a node implements.
100+
This field can be used to determine the [*type*][term-type] a node implements.
101101

102102
The `data` field represents information from the ecosystem.
103103
The value of the `data` field implements the [**Data**][dfn-data] interface.
@@ -106,7 +106,7 @@ The `position` field represents the location of a node in a source document.
106106
The value of the `position` field implements the [**Position**][dfn-position]
107107
interface.
108108
The `position` field must not be present if a node is
109-
[_generated_][term-generated].
109+
[*generated*][term-generated].
110110

111111
Specifications implementing unist are encouraged to define more fields.
112112
Ecosystems can define fields on [**Data**][dfn-data].
@@ -128,7 +128,7 @@ interface Position {
128128
}
129129
```
130130

131-
**Position** represents the location of a node in a source [_file_][term-file].
131+
**Position** represents the location of a node in a source [*file*][term-file].
132132

133133
The `start` field of **Position** represents the place of the first character
134134
of the parsed source region.
@@ -141,8 +141,8 @@ The `indent` field of **Position** represents the start column at each index
141141
(plus start line) in the source region, for elements that span multiple lines.
142142

143143
If the syntactic unit represented by a node is not present in the source
144-
[_file_][term-file] at the time of parsing, the node is said to be
145-
[_generated_][term-generated] and it must not have positional information.
144+
[*file*][term-file] at the time of parsing, the node is said to be
145+
[*generated*][term-generated] and it must not have positional information.
146146

147147
For example, if the following value was represented as unist:
148148

@@ -168,7 +168,7 @@ interface Point {
168168
}
169169
```
170170

171-
**Point** represents one place in a source [_file_][term-file].
171+
**Point** represents one place in a source [*file*][term-file].
172172

173173
The `line` field (1-indexed integer) represents a line in a source file.
174174
The `column` field (1-indexed integer) represents a column in a source file.
@@ -196,7 +196,7 @@ interface Parent <: Node {
196196
}
197197
```
198198

199-
Nodes containing other nodes (said to be [_children_][term-child]) extend the
199+
Nodes containing other nodes (said to be [*children*][term-child]) extend the
200200
abstract interface **Parent** ([**Node**][dfn-node]).
201201

202202
The `children` field is a list representing the children of a node.
@@ -218,74 +218,74 @@ The `value` field can contain any value.
218218

219219
###### Tree
220220

221-
A **tree** is a node and all of its [_descendants_][term-descendant] (if any).
221+
A **tree** is a node and all of its [*descendants*][term-descendant] (if any).
222222

223223
###### Child
224224

225225
Node X is **child** of node Y, if Y’s `children` include X.
226226

227227
###### Parent
228228

229-
Node X is **parent** of node Y, if Y is a [_child_][term-child] of X.
229+
Node X is **parent** of node Y, if Y is a [*child*][term-child] of X.
230230

231231
###### Index
232232

233-
The **index** of a [_child_][term-child] is its number of preceding
234-
[_siblings_][term-sibling], or `0` if it has none.
233+
The **index** of a [*child*][term-child] is its number of preceding
234+
[*siblings*][term-sibling], or `0` if it has none.
235235

236236
###### Sibling
237237

238238
Node X is a **sibling** of node Y, if X and Y have the same
239-
[_parent_][term-parent] (if any).
239+
[*parent*][term-parent] (if any).
240240

241-
The **previous sibling** of a [_child_][term-child] is its **sibling** at its
242-
[_index_][term-index] minus 1.
241+
The **previous sibling** of a [*child*][term-child] is its **sibling** at its
242+
[*index*][term-index] minus 1.
243243

244-
The **next sibling** of a [_child_][term-child] is its **sibling** at its
245-
[_index_][term-index] plus 1.
244+
The **next sibling** of a [*child*][term-child] is its **sibling** at its
245+
[*index*][term-index] plus 1.
246246

247247
###### Root
248248

249-
The **root** of a node is itself, if without [_parent_][term-parent], or the
250-
**root** of its [_parent_][term-parent].
249+
The **root** of a node is itself, if without [*parent*][term-parent], or the
250+
**root** of its [*parent*][term-parent].
251251

252-
The **root** of a [_tree_][term-tree] is any node in that [_tree_][term-tree]
253-
without [_parent_][term-parent].
252+
The **root** of a [*tree*][term-tree] is any node in that [*tree*][term-tree]
253+
without [*parent*][term-parent].
254254

255255
###### Descendant
256256

257-
Node X is **descendant** of node Y, if X is a [_child_][term-child] of Y, or if
258-
X is a [_child_][term-child] of node Z that is a **descendant** of Y.
257+
Node X is **descendant** of node Y, if X is a [*child*][term-child] of Y, or if
258+
X is a [*child*][term-child] of node Z that is a **descendant** of Y.
259259

260260
An **inclusive descendant** is a node or one of its **descendants**.
261261

262262
###### Ancestor
263263

264-
Node X is an **ancestor** of node Y, if Y is a [_descendant_][term-descendant]
264+
Node X is an **ancestor** of node Y, if Y is a [*descendant*][term-descendant]
265265
of X.
266266

267267
An **inclusive ancestor** is a node or one of its **ancestors**.
268268

269269
###### Head
270270

271-
The **head** of a node is its first [_child_][term-child] (if any).
271+
The **head** of a node is its first [*child*][term-child] (if any).
272272

273273
###### Tail
274274

275-
The **tail** of a node is its last [_child_][term-child] (if any).
275+
The **tail** of a node is its last [*child*][term-child] (if any).
276276

277277
###### Leaf
278278

279-
A **leaf** is a node with no [_children_][term-child].
279+
A **leaf** is a node with no [*children*][term-child].
280280

281281
###### Branch
282282

283-
A **branch** is a node with one or more [_children_][term-child].
283+
A **branch** is a node with one or more [*children*][term-child].
284284

285285
###### Generated
286286

287-
A node is **generated** if it does not have [_positional
288-
information_][term-positional-info].
287+
A node is **generated** if it does not have [*positional
288+
information*][term-positional-info].
289289

290290
###### Type
291291

@@ -299,7 +299,7 @@ The **positional information** of a node is the value of its `position` field.
299299

300300
A **file** is a source document that represents the original file that was
301301
parsed to produce the syntax tree.
302-
[_Positional information_][term-positional-info] represents the place of a node
302+
[*Positional information*][term-positional-info] represents the place of a node
303303
in this file.
304304
Files are provided by the host environment and not defined by unist.
305305

@@ -308,44 +308,44 @@ For example, see projects such as [**vfile**][vfile].
308308
###### Preorder
309309

310310
In **preorder** (**NLR**) is [depth-first][traversal-depth] [tree
311-
traversal][traversal] that performs the following steps for each node _N_:
311+
traversal][traversal] that performs the following steps for each node *N*:
312312

313-
1. **N**: visit _N_ itself
314-
2. **L**: traverse [_head_][term-head] (then its _next sibling_, recursively
315-
moving forward until reaching _tail_)
316-
3. **R**: traverse [_tail_][term-tail]
313+
1. **N**: visit *N* itself
314+
2. **L**: traverse [*head*][term-head] (then its *next sibling*, recursively
315+
moving forward until reaching *tail*)
316+
3. **R**: traverse [*tail*][term-tail]
317317

318318
###### Postorder
319319

320320
In **postorder** (**LRN**) is [depth-first][traversal-depth] [tree
321-
traversal][traversal] that performs the following steps for each node _N_:
321+
traversal][traversal] that performs the following steps for each node *N*:
322322

323-
1. **L**: traverse [_head_][term-head] (then its _next sibling_, recursively
324-
moving forward until reaching _tail_)
325-
2. **R**: traverse [_tail_][term-tail]
326-
3. **N**: visit _N_ itself
323+
1. **L**: traverse [*head*][term-head] (then its *next sibling*, recursively
324+
moving forward until reaching *tail*)
325+
2. **R**: traverse [*tail*][term-tail]
326+
3. **N**: visit *N* itself
327327

328328
###### Enter
329329

330-
**Enter** is a step right before other steps performed on a given node _N_ when
330+
**Enter** is a step right before other steps performed on a given node *N* when
331331
[**traversing**][traversal] a tree.
332332

333-
For example, when performing _preorder_ traversal, **enter** is the first step
334-
taken, right before visiting _N_ itself.
333+
For example, when performing *preorder* traversal, **enter** is the first step
334+
taken, right before visiting *N* itself.
335335

336336
###### Exit
337337

338-
**Exit** is a step right after other steps performed on a given node _N_ when
338+
**Exit** is a step right after other steps performed on a given node *N* when
339339
[**traversing**][traversal] a tree.
340340

341-
For example, when performing _preorder_ traversal, **exit** is the last step
342-
taken, right after traversing the [_tail_][term-tail] of _N_.
341+
For example, when performing *preorder* traversal, **exit** is the last step
342+
taken, right after traversing the [*tail*][term-tail] of *N*.
343343

344344
## Tree traversal
345345

346-
**Tree traversal** is a common task when working with a [_tree_][term-tree] to
346+
**Tree traversal** is a common task when working with a [*tree*][term-tree] to
347347
search it.
348-
Tree traversal is typically either _breadth-first_ or _depth-first_.
348+
Tree traversal is typically either *breadth-first* or *depth-first*.
349349

350350
In the following examples, we’ll work with this tree:
351351

@@ -370,8 +370,8 @@ In the following examples, we’ll work with this tree:
370370
###### Breadth-first traversal
371371

372372
**Breadth-first traversal** is visiting a node and all its
373-
[_siblings_][term-sibling] to broaden the search at that level, before
374-
traversing [_children_][term-child].
373+
[*siblings*][term-sibling] to broaden the search at that level, before
374+
traversing [*children*][term-child].
375375

376376
For the syntax tree defined in the diagram, a breadth-first traversal first
377377
searches the root of the tree (**A**), then its children (**B** and **F**), then
@@ -380,41 +380,41 @@ their children (**C**, **D**, **E**, and **G**).
380380
###### Depth-first traversal
381381

382382
Alternatively, and more commonly, **depth-first traversal** is used.
383-
The search is first deepened, by traversing [_children_][term-child], before
384-
traversing [_siblings_][term-sibling].
383+
The search is first deepened, by traversing [*children*][term-child], before
384+
traversing [*siblings*][term-sibling].
385385

386386
For the syntax tree defined in the diagram, a depth-first traversal first
387387
searches the root of the tree (**A**), then one of its children (**B** or
388388
**F**), then their children (**C**, **D**, and **E**, or **G**).
389389

390-
For a given node _N_ with [_children_][term-child], a **depth-first traversal**
390+
For a given node *N* with [*children*][term-child], a **depth-first traversal**
391391
performs three steps, simplified to only binary trees (every node has
392-
[_head_][term-head] and [_tail_][term-tail], but no other children):
392+
[*head*][term-head] and [*tail*][term-tail], but no other children):
393393

394-
* **N**: visit _N_ itself
395-
* **L**: traverse [_head_][term-head]
396-
* **R**: traverse [_tail_][term-tail]
394+
* **N**: visit *N* itself
395+
* **L**: traverse [*head*][term-head]
396+
* **R**: traverse [*tail*][term-tail]
397397

398398
These steps can be done in any order, but for non-binary trees, **L** and **R**
399399
occur together.
400-
If **L** is done before **R**, the traversal is called _left-to-right_
401-
traversal, otherwise it is called _right-to-left_ traversal.
402-
In the case of non-binary trees, the other children between _head_ and _tail_
403-
are processed in that order as well, so for _left-to-right_ traversal, first
404-
_head_ is traversed (**L**), then its _next sibling_ is traversed, etcetera,
405-
until finally _tail_ (**R**) is traversed.
400+
If **L** is done before **R**, the traversal is called *left-to-right*
401+
traversal, otherwise it is called *right-to-left* traversal.
402+
In the case of non-binary trees, the other children between *head* and *tail*
403+
are processed in that order as well, so for *left-to-right* traversal, first
404+
*head* is traversed (**L**), then its *next sibling* is traversed, etcetera,
405+
until finally *tail* (**R**) is traversed.
406406

407407
Because **L** and **R** occur together for non-binary trees, we can produce four
408408
types of orders: NLR, NRL, LRN, RLN.
409409

410-
NLR and LRN (the two _left-to-right_ traversal options) are most commonly used
411-
and respectively named [_preorder_][term-preorder] and
412-
[_postorder_][term-postorder].
410+
NLR and LRN (the two *left-to-right* traversal options) are most commonly used
411+
and respectively named [*preorder*][term-preorder] and
412+
[*postorder*][term-postorder].
413413

414-
For the syntax tree defined in the diagram, _preorder_ and _postorder_ traversal
414+
For the syntax tree defined in the diagram, *preorder* and *postorder* traversal
415415
thus first search the root of the tree (**A**), then its head (**B**), then its
416416
children from left-to-right (**C**, **D**, and then **E**).
417-
After all [_descendants_][term-descendant] of **B** are traversed, its next
417+
After all [*descendants*][term-descendant] of **B** are traversed, its next
418418
sibling (**F**) is traversed and then finally its only child (**G**).
419419

420420
## Utilities

0 commit comments

Comments
 (0)