Skip to content

Commit 60f8368

Browse files
committed
Refactor readme.md to use definitions
1 parent a72fa40 commit 60f8368

File tree

1 file changed

+34
-17
lines changed

1 file changed

+34
-17
lines changed

readme.md

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
# ![Unist](https://cdn.rawgit.com/wooorm/unist/master/logo.svg)
1+
# ![Unist][logo]
22

33
**Unist** (**uni**versal **s**yntax **t**ree) is the combination of three
44
project, and more to come, which are the summation of at least
5-
[two](https://github.com/wooorm/retext/commit/8fcb1ff4874d1891791280d63125d27ed29b58a8)
6-
[years](https://github.com/wooorm/remark/commit/19585b8) of my work and the
5+
[two][first-retext-commit] [years][first-remark-commit] of my work and the
76
current epitome of that.
87

98
It’s basically a system for processing input: parsing it into a syntax tree,
109
transforming it by plug-ins, and compiling the tree to something else.
1110

12-
This document explains some terminology relating to
13-
[**retext**](https://github.com/wooorm/retext),
14-
[**remark**](https://github.com/wooorm/remark),
15-
[**hast**](https://github.com/wooorm/hast),
16-
and their related projects.
11+
This document explains some terminology relating to [**retext**][retext],
12+
[**remark**][remark], [**hast**][hast], and their related projects.
1713

1814
## Unist nodes
1915

@@ -30,7 +26,7 @@ and their related projects.
3026
* may have a `position` property set to a an object containing `start` and
3127
`end`, both of which contain an object with `line` and `column` set
3228
to an integer referencing their respective (1-based) line and column
33-
in the input file. Both may have an `offset` property set to its
29+
in the input file. Both may have an `offset` property set to its
3430
index from the beginning of the input.
3531
The object at `position` may additionally have an `indent` property
3632
set to an array of integers higher than 0 (not including), in which
@@ -39,23 +35,22 @@ and their related projects.
3935
If a node represents something not available in the original input, it
4036
must not have a `position`.
4137

42-
See [**nlcst**](https://github.com/wooorm/nlcst) for more information
43-
on **retext** nodes, [**mdast**](https://github.com/wooorm/mdast)
44-
for information on **remark** nodes, and [`hast#nodes`](https://github.com/wooorm/hast#nodes)
45-
for information on **hast** nodes.
38+
See [**nlcst**][nlcst] for more information on **retext** nodes,
39+
[**mdast**][mdast] for information on **remark** nodes, and
40+
[`hast#nodes`][hast-nodes] for information on **hast** nodes.
4641

4742
## Unist files
4843

49-
**Unist files** are virtual files (such as [**vfile**](https://github.com/wooorm/vfile))
50-
representing content at a certain location. They are not limited to existing
51-
files. Neither are they limited to the file-system only.
44+
**Unist files** are virtual files (such as [**vfile**][vfile])
45+
representing content at a certain location. They are not limited to
46+
existing files. Neither are they limited to the file-system only.
5247

5348
## Unist utilities
5449

5550
**Unist utilities** are function which work with **unist nodes** or **unist
5651
files**, agnostic of **remark**, **retext**, or **hast**.
5752

58-
A list of **VFile**-related utilities can be found at [**vfile**](https://github.com/wooorm/vfile).
53+
A list of **VFile**-related utilities can be found at [**vfile**][vfile].
5954

6055
### Unist node utilties
6156

@@ -101,3 +96,25 @@ A list of **VFile**-related utilities can be found at [**vfile**](https://github
10196

10297
* [`unist-builder`](https://github.com/eush77/unist-builder)
10398
— Helper for creating trees.
99+
100+
<!-- Definitions -->
101+
102+
[logo]: https://cdn.rawgit.com/wooorm/unist/master/logo.svg
103+
104+
[first-retext-commit]: https://github.com/wooorm/retext/commit/8fcb1ff
105+
106+
[first-remark-commit]: https://github.com/wooorm/remark/commit/19585b8
107+
108+
[retext]: https://github.com/wooorm/retext
109+
110+
[remark]: https://github.com/wooorm/remark
111+
112+
[hast]: https://github.com/wooorm/hast
113+
114+
[nlcst]: https://github.com/wooorm/nlcst
115+
116+
[mdast]: https://github.com/wooorm/mdast
117+
118+
[hast-nodes]: https://github.com/wooorm/hast#nodes
119+
120+
[vfile]: https://github.com/wooorm/vfile

0 commit comments

Comments
 (0)