Skip to content

Commit d030c72

Browse files
committed
Refactor docs
1 parent ca24232 commit d030c72

File tree

1 file changed

+53
-31
lines changed

1 file changed

+53
-31
lines changed

readme.md

+53-31
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,31 @@ The latest released version is [`1.0.2`][latest].
4242

4343
This document defines a format for representing natural language as a [concrete
4444
syntax tree][syntax-tree].
45-
Development of nlcst started in May 2014, in the now deprecated [textom][]
46-
project for [retext][], before [unist][] existed.
45+
Development of nlcst started in May 2014,
46+
in the now deprecated [textom][] project for [retext][],
47+
before [unist][] existed.
4748
This specification is written in a [Web IDL][webidl]-like grammar.
4849

4950
### Where this specification fits
5051

51-
nlcst extends [unist][], a format for syntax trees, to benefit from its
52-
[ecosystem of utilities][utilities].
52+
nlcst extends [unist][],
53+
a format for syntax trees,
54+
to benefit from its [ecosystem of utilities][utilities].
5355

5456
nlcst relates to [JavaScript][] in that it has an [ecosystem of
5557
utilities][list-of-utilities] for working with compliant syntax trees in
5658
JavaScript.
57-
However, nlcst is not limited to JavaScript and can be used in other programming
59+
However,
60+
nlcst is not limited to JavaScript and can be used in other programming
5861
languages.
5962

6063
nlcst relates to the [unified][] and [retext][] projects in that nlcst syntax
6164
trees are used throughout their ecosystems.
6265

6366
## Types
6467

65-
If you are using TypeScript, you can use the nlcst types by installing them
66-
with npm:
68+
If you are using TypeScript,
69+
you can use the nlcst types by installing them with npm:
6770

6871
```sh
6972
npm install @types/nlcst
@@ -112,7 +115,8 @@ interface Paragraph <: Parent {
112115
with a particular point or idea.
113116

114117
**Paragraph** can be used in a [**root**][dfn-root] node.
115-
It can contain [**sentence**][dfn-sentence], [**whitespace**][dfn-whitespace],
118+
It can contain [**sentence**][dfn-sentence],
119+
[**whitespace**][dfn-whitespace],
116120
and [**source**][dfn-source] nodes.
117121

118122
### `Punctuation`
@@ -139,10 +143,11 @@ interface Root <: Parent {
139143

140144
**Root** ([**Parent**][dfn-parent]) represents a document.
141145

142-
**Root** can be used as the [*root*][term-root] of a [*tree*][term-tree], never
143-
as a [*child*][term-child].
144-
Its content model is not limited, it can contain any nlcst content, with the
145-
restriction that all content must be of the same category.
146+
**Root** can be used as the [*root*][term-root] of a [*tree*][term-tree],
147+
never as a [*child*][term-child].
148+
Its content model is not limited,
149+
it can contain any nlcst content,
150+
with the restriction that all content must be of the same category.
146151

147152
### `Sentence`
148153

@@ -154,13 +159,16 @@ interface Sentence <: Parent {
154159
```
155160

156161
**Sentence** ([**Parent**][dfn-parent]) represents grouping of grammatically
157-
linked words, that in principle tells a complete thought, although it may make
158-
little sense taken in isolation out of context.
162+
linked words,
163+
that in principle tells a complete thought,
164+
although it may make little sense taken in isolation out of context.
159165

160166
**Sentence** can be used in a [**paragraph**][dfn-paragraph] node.
161-
It can contain [**word**][dfn-word], [**symbol**][dfn-symbol],
162-
[**punctuation**][dfn-punctuation], [**whitespace**][dfn-whitespace], and
163-
[**source**][dfn-source] nodes.
167+
It can contain [**word**][dfn-word],
168+
[**symbol**][dfn-symbol],
169+
[**punctuation**][dfn-punctuation],
170+
[**whitespace**][dfn-whitespace],
171+
and [**source**][dfn-source] nodes.
164172

165173
### `Source`
166174

@@ -171,10 +179,14 @@ interface Source <: Literal {
171179
```
172180

173181
**Source** ([**Literal**][dfn-literal]) represents an external (ungrammatical)
174-
value embedded into a grammatical unit: a hyperlink, code, and such.
182+
value embedded into a grammatical unit: a hyperlink,
183+
code,
184+
and such.
175185

176-
**Source** can be used in [**root**][dfn-root], [**paragraph**][dfn-paragraph],
177-
[**sentence**][dfn-sentence], or [**word**][dfn-word] nodes.
186+
**Source** can be used in [**root**][dfn-root],
187+
[**paragraph**][dfn-paragraph],
188+
[**sentence**][dfn-sentence],
189+
or [**word**][dfn-word] nodes.
178190

179191
### `Symbol`
180192

@@ -186,7 +198,8 @@ interface Symbol <: Literal {
186198

187199
**Symbol** ([**Literal**][dfn-literal]) represents typographical devices
188200
different from characters which represent sounds (like letters and numerals),
189-
white space, or punctuation.
201+
white space,
202+
or punctuation.
190203

191204
**Symbol** can be used in [**sentence**][dfn-sentence] or [**word**][dfn-word]
192205
nodes.
@@ -213,10 +226,12 @@ interface WhiteSpace <: Literal {
213226
```
214227

215228
**WhiteSpace** ([**Literal**][dfn-literal]) represents typographical devices
216-
devoid of content, separating other units.
229+
devoid of content,
230+
separating other units.
217231

218232
**WhiteSpace** can be used in [**root**][dfn-root],
219-
[**paragraph**][dfn-paragraph], or [**sentence**][dfn-sentence] nodes.
233+
[**paragraph**][dfn-paragraph],
234+
or [**sentence**][dfn-sentence] nodes.
220235

221236
### `Word`
222237

@@ -231,8 +246,10 @@ interface Word <: Parent {
231246
uttered in isolation with semantic or pragmatic content.
232247

233248
**Word** can be used in a [**sentence**][dfn-sentence] node.
234-
It can contain [**text**][dfn-text], [**symbol**][dfn-symbol],
235-
[**punctuation**][dfn-punctuation], and [**source**][dfn-source] nodes.
249+
It can contain [**text**][dfn-text],
250+
[**symbol**][dfn-symbol],
251+
[**punctuation**][dfn-punctuation],
252+
and [**source**][dfn-source] nodes.
236253

237254
## Glossary
238255

@@ -292,12 +309,17 @@ ways to get started.
292309
See [`support.md`][support] for ways to get help.
293310
Ideas for new utilities and tools can be posted in [`syntax-tree/ideas`][ideas].
294311

295-
A curated list of awesome syntax-tree, unist, mdast, hast, xast, and nlcst
296-
resources can be found in [awesome syntax-tree][awesome].
312+
A curated list of awesome syntax-tree,
313+
unist,
314+
mdast,
315+
hast,
316+
xast,
317+
and nlcst resources can be found in [awesome syntax-tree][awesome].
297318

298319
This project has a [code of conduct][coc].
299-
By interacting with this repository, organization, or community you agree to
300-
abide by its terms.
320+
By interacting with this repository,
321+
organization,
322+
or community you agree to abide by its terms.
301323

302324
## Acknowledgments
303325

@@ -307,8 +329,8 @@ The initial release of this project was authored by
307329
Thanks to
308330
[**@nwtn**](https://github.com/nwtn),
309331
[**@tmcw**](https://github.com/tmcw),
310-
[**@muraken720**](https://github.com/muraken720), and
311-
[**@dozoisch**](https://github.com/dozoisch)
332+
[**@muraken720**](https://github.com/muraken720),
333+
and [**@dozoisch**](https://github.com/dozoisch)
312334
for contributing to nlcst and related projects!
313335

314336
## License

0 commit comments

Comments
 (0)