Skip to content

Commit 3b7b07d

Browse files
committed
Refactor prose
1 parent 52a3731 commit 3b7b07d

File tree

1 file changed

+36
-20
lines changed

1 file changed

+36
-20
lines changed

readme.md

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,27 @@
33
[![Build][build-badge]][build]
44
[![Coverage][coverage-badge]][coverage]
55
[![Downloads][downloads-badge]][downloads]
6+
[![Size][size-badge]][size]
7+
[![Sponsors][sponsors-badge]][collective]
8+
[![Backers][backers-badge]][collective]
69
[![Chat][chat-badge]][chat]
710

8-
Transform [HAST][] to [Parse5’s AST][ast].
11+
[**hast**][hast] utility to transform to [Parse5’s AST][ast].
912

10-
Why not use an adapter? Because it’s more code weight to use adapters,
11-
and much more fragile.
13+
> **Q**: Why not use a Parse5 adapter?
14+
> **A**: Because it’s more code weight to use adapters, and much more fragile.
1215
13-
## Installation
16+
## Install
1417

1518
[npm][]:
1619

17-
```bash
20+
```sh
1821
npm install hast-util-to-parse5
1922
```
2023

2124
## Usage
2225

23-
```javascript
26+
```js
2427
var toParse5 = require('hast-util-to-parse5')
2528

2629
var ast = toParse5({
@@ -47,25 +50,26 @@ Yields:
4750

4851
### `toParse5(tree[, space])`
4952

50-
Transform a [HAST Node][node] to an `ASTNode` according to the default
51-
Parse5 adapter.
53+
Transform a [**hast**][hast] [*tree*][tree] to [Parse5’s AST][ast].
5254

5355
###### `space`
5456

55-
Whether the root of the given tree is in the `'html'` or `'svg'` space (enum,
56-
`'svg'` or `'html'`, default: `'html'`).
57+
Whether the root of the given [*tree*][tree] is in the `'html'` or `'svg'` space
58+
(enum, `'svg'` or `'html'`, default: `'html'`).
5759

5860
If an `svg` element is found in the HTML space, `toParse5` automatically
5961
switches to the SVG space when entering the element, and switches back when
60-
leaving.
62+
exiting.
6163

6264
## Contribute
6365

64-
See [`contributing.md` in `syntax-tree/hast`][contributing] for ways to get
66+
See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
6567
started.
68+
See [`support.md`][support] for ways to get help.
6669

67-
This organisation has a [Code of Conduct][coc]. By interacting with this
68-
repository, organisation, or community you agree to abide by its terms.
70+
This project has a [Code of Conduct][coc].
71+
By interacting with this repository, organisation, or community you agree to
72+
abide by its terms.
6973

7074
## License
7175

@@ -85,22 +89,34 @@ repository, organisation, or community you agree to abide by its terms.
8589

8690
[downloads]: https://www.npmjs.com/package/hast-util-to-parse5
8791

92+
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-to-parse5.svg
93+
94+
[size]: https://bundlephobia.com/result?p=hast-util-to-parse5
95+
96+
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
97+
98+
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
99+
100+
[collective]: https://opencollective.com/unified
101+
88102
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
89103

90-
[chat]: https://spectrum.chat/unified/rehype
104+
[chat]: https://spectrum.chat/unified/syntax-tree
91105

92106
[npm]: https://docs.npmjs.com/cli/install
93107

94108
[license]: license
95109

96110
[author]: https://wooorm.com
97111

98-
[hast]: https://github.com/syntax-tree/hast
112+
[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
99113

100-
[ast]: https://github.com/inikulin/parse5/wiki/Documentation
114+
[support]: https://github.com/syntax-tree/.github/blob/master/support.md
101115

102-
[node]: https://github.com/syntax-tree/hast#ast
116+
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
103117

104-
[contributing]: https://github.com/syntax-tree/hast/blob/master/contributing.md
118+
[ast]: https://github.com/inikulin/parse5/wiki/Documentation
105119

106-
[coc]: https://github.com/syntax-tree/hast/blob/master/code-of-conduct.md
120+
[tree]: https://github.com/syntax-tree/unist#tree
121+
122+
[hast]: https://github.com/syntax-tree/hast

0 commit comments

Comments
 (0)