Skip to content

Commit 0346b32

Browse files
committed
Add links to glossary
1 parent 41e8825 commit 0346b32

File tree

1 file changed

+29
-15
lines changed

1 file changed

+29
-15
lines changed

readme.md

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -132,58 +132,60 @@ interface Text <: Node {
132132

133133
###### Tree
134134

135-
A **tree** is a node and all of its **descendants** (if any).
135+
A **tree** is a node and all of its [descendants][descendant] (if any).
136136

137137
###### Child
138138

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

141141
###### Parent
142142

143-
Node X is **parent** of node Y, if Y is a **child** of X.
143+
Node X is **parent** of node Y, if Y is a [child][] of X.
144144

145145
###### Index
146146

147-
The **index** of a **child** is its number of preceding **siblings**, or `0` if
148-
it has none.
147+
The **index** of a [child][] is its number of preceding [siblings][sibling], or
148+
`0` if it has none.
149149

150150
###### Sibling
151151

152-
Node X is a **sibling** of node Y, if X and Y have the same **parent** (if any).
152+
Node X is a **sibling** of node Y, if X and Y have the same
153+
[parent][parent-term] (if any).
153154

154-
The **previous sibling** of a **child** is its **sibling** at its **index**
155+
The **previous sibling** of a [child][] is its **sibling** at its [index][]
155156
minus 1.
156157

157-
The **next sibling** of a **child** is its **sibling** at its **index**
158+
The **next sibling** of a [child][] is its **sibling** at its [index][]
158159
plus 1.
159160

160161
###### Root
161162

162-
The **root** of an object is itself, if without **parent**, or the **root** of
163-
its **parent**.
163+
The **root** of an object is itself, if without [parent][parent-term] or the
164+
**root** of its [parent][parent-term].
164165

165-
The **root** of a **tree** is any node in that **tree** without **parent**.
166+
The **root** of a [tree][] is any node in that [tree][] without
167+
[parent][parent-term].
166168

167169
###### Descendant
168170

169-
Node X is **descendant** of node Y, if X is a **child** of Y, or if X is a
170-
**child** of node Z that is a **descendant** of Y.
171+
Node X is **descendant** of node Y, if X is a [child][] of Y, or if X is a
172+
[child][] of node Z that is a **descendant** of Y.
171173

172174
An **inclusive descendant** is a node or one of its **descendants**.
173175

174176
###### Ancestor
175177

176-
Node X is an **ancestor** of node Y, if Y is a **descendant** of X.
178+
Node X is an **ancestor** of node Y, if Y is a [descendant][] of X.
177179

178180
An **inclusive ancestor** is a node or one of its **ancestors**.
179181

180182
###### Head
181183

182-
The **head** of a node is its first **child** (if any).
184+
The **head** of a node is its first [child][] (if any).
183185

184186
###### Tail
185187

186-
The **tail** of a node is its last **child** (if any).
188+
The **tail** of a node is its last [child][] (if any).
187189

188190
## Unist files
189191

@@ -328,3 +330,15 @@ Thanks to [**@azu**](https://github.com/azu),
328330
[license]: https://creativecommons.org/licenses/by/4.0/
329331

330332
[author]: http://wooorm.com
333+
334+
[descendant]: #descendant
335+
336+
[child]: #child
337+
338+
[sibling]: #sibling
339+
340+
[parent-term]: #parent-1
341+
342+
[index]: #index
343+
344+
[tree]: #tree

0 commit comments

Comments
 (0)