Skip to content

Commit 9da9343

Browse files
committed
Refactor prose
1 parent 380f9fd commit 9da9343

File tree

1 file changed

+45
-16
lines changed

1 file changed

+45
-16
lines changed

readme.md

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
# mdast-zone [![Build][build-badge]][build] [![Coverage][coverage-badge]][coverage] [![Downloads][downloads-badge]][downloads] [![Chat][chat-badge]][chat]
1+
# mdast-zone
2+
3+
[![Build][build-badge]][build]
4+
[![Coverage][coverage-badge]][coverage]
5+
[![Downloads][downloads-badge]][downloads]
6+
[![Size][size-badge]][size]
7+
[![Sponsors][sponsors-badge]][collective]
8+
[![Backers][backers-badge]][collective]
9+
[![Chat][chat-badge]][chat]
210

311
[**mdast**][mdast] utility to treat HTML comments as ranges.
12+
413
Useful in [**remark**][remark] plugins.
514

6-
## Installation
15+
## Install
716

817
[npm][]:
918

10-
```bash
19+
```sh
1120
npm install mdast-zone
1221
```
1322

@@ -25,7 +34,7 @@ Foo
2534

2635
And our script, `example.js`, looks as follows:
2736

28-
```javascript
37+
```js
2938
var vfile = require('to-vfile')
3039
var remark = require('remark')
3140
var zone = require('mdast-zone')
@@ -72,7 +81,7 @@ Search `tree` for comment ranges (“zones”).
7281

7382
###### Parameters
7483

75-
* `tree` ([`Node`][mdast]) — Node to search for ranges
84+
* `tree` ([`Node`][node]) — [Tree][] to search for ranges
7685
* `name` (`string`) — Name of ranges to search for
7786
* `handler` ([`Function`][handler]) — Function invoked for each found range
7887

@@ -83,22 +92,24 @@ and the last `end`, and the content inside.
8392

8493
###### Parameters
8594

86-
* `start` ([`Node`][mdast]) — Start of range (an HTML comment node)
87-
* `nodes` (`Array.<Node>`) — Nodes between `start` and `end`
88-
* `end` ([`Node`][mdast]) — End of range (an HTML comment node)
95+
* `start` ([`Node`][node]) — Start of range (an [HTML][] comment node)
96+
* `nodes` ([`Array.<Node>`][node]) — Nodes between `start` and `end`
97+
* `end` ([`Node`][node]) — End of range (an [HTML][] comment node)
8998

9099
###### Returns
91100

92-
`Array.<Node>?` — List of nodes to replace `start`, `nodes`, and `end`
101+
[`Array.<Node>?`][node] — List of nodes to replace `start`, `nodes`, and `end`
93102
with, optional.
94103

95104
## Contribute
96105

97-
See [`contributing.md` in `syntax-tree/mdast`][contributing] for ways to get
106+
See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
98107
started.
108+
See [`support.md`][support] for ways to get help.
99109

100-
This organisation has a [Code of Conduct][coc]. By interacting with this
101-
repository, organisation, or community you agree to abide by its terms.
110+
This project has a [Code of Conduct][coc].
111+
By interacting with this repository, organisation, or community you agree to
112+
abide by its terms.
102113

103114
## License
104115

@@ -118,22 +129,40 @@ repository, organisation, or community you agree to abide by its terms.
118129

119130
[downloads]: https://www.npmjs.com/package/mdast-zone
120131

132+
[size-badge]: https://img.shields.io/bundlephobia/minzip/mdast-zone.svg
133+
134+
[size]: https://bundlephobia.com/result?p=mdast-zone
135+
136+
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
137+
138+
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
139+
140+
[collective]: https://opencollective.com/unified
141+
121142
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
122143

123-
[chat]: https://spectrum.chat/unified/remark
144+
[chat]: https://spectrum.chat/unified/syntax-tree
124145

125146
[npm]: https://docs.npmjs.com/cli/install
126147

127148
[license]: license
128149

129150
[author]: https://wooorm.com
130151

152+
[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
153+
154+
[support]: https://github.com/syntax-tree/.github/blob/master/support.md
155+
156+
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
157+
131158
[mdast]: https://github.com/syntax-tree/mdast
132159

133-
[remark]: https://github.com/wooorm/remark
160+
[remark]: https://github.com/remarkjs/remark
134161

135162
[handler]: #function-handlerstart-nodes-end
136163

137-
[contributing]: https://github.com/syntax-tree/mdast/blob/master/contributing.md
164+
[node]: https://github.com/syntax-tree/mdast#nodes
165+
166+
[tree]: https://github.com/syntax-tree/unist#tree
138167

139-
[coc]: https://github.com/syntax-tree/mdast/blob/master/code-of-conduct.md
168+
[html]: https://github.com/syntax-tree/mdast#html

0 commit comments

Comments
 (0)