Skip to content

Commit f4e1f7a

Browse files
committed
Refactor prose
1 parent 69dab19 commit f4e1f7a

File tree

1 file changed

+37
-14
lines changed

1 file changed

+37
-14
lines changed

Diff for: readme.md

+37-14
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,25 @@
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-
Parse a simple CSS selector to a [HAST][] node.
11+
[**hast**][hast] utility to create an [*element*][element] from a simple CSS
12+
selector.
913

10-
## Installation
14+
## Install
1115

1216
[npm][]:
1317

14-
```bash
18+
```sh
1519
npm install hast-util-parse-selector
1620
```
1721

1822
## Usage
1923

20-
```javascript
24+
```js
2125
var parseSelector = require('hast-util-parse-selector')
2226

2327
console.log(parseSelector('.quux#bar.baz.qux'))
@@ -36,13 +40,14 @@ Yields:
3640

3741
### `parseSelector([selector][, defaultTagName])`
3842

39-
Parse a CSS `selector` to a [HAST][] node.
43+
Create an [*element*][element] [*node*][node] from a simple CSS selector.
4044

4145
###### `selector`
4246

4347
`string`, optional — Can contain a tag-name (`foo`), classes (`.bar`),
44-
and an ID (`#baz`). Multiple classes are allowed. Uses the last ID if
45-
multiple IDs are found.
48+
and an ID (`#baz`).
49+
Multiple classes are allowed.
50+
Uses the last ID if multiple IDs are found.
4651

4752
###### `defaultTagName`
4853

@@ -51,15 +56,17 @@ specify one.
5156

5257
###### Returns
5358

54-
[`Node`][hast].
59+
[`Element`][element].
5560

5661
## Contribute
5762

58-
See [`contributing.md` in `syntax-tree/hast`][contributing] for ways to get
63+
See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
5964
started.
65+
See [`support.md`][support] for ways to get help.
6066

61-
This organisation has a [Code of Conduct][coc]. By interacting with this
62-
repository, organisation, or community you agree to abide by its terms.
67+
This project has a [Code of Conduct][coc].
68+
By interacting with this repository, organisation, or community you agree to
69+
abide by its terms.
6370

6471
## License
6572

@@ -79,18 +86,34 @@ repository, organisation, or community you agree to abide by its terms.
7986

8087
[downloads]: https://www.npmjs.com/package/hast-util-parse-selector
8188

89+
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-parse-selector.svg
90+
91+
[size]: https://bundlephobia.com/result?p=hast-util-parse-selector
92+
93+
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
94+
95+
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
96+
97+
[collective]: https://opencollective.com/unified
98+
8299
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
83100

84-
[chat]: https://spectrum.chat/unified/rehype
101+
[chat]: https://spectrum.chat/unified/syntax-tree
85102

86103
[npm]: https://docs.npmjs.com/cli/install
87104

88105
[license]: license
89106

90107
[author]: https://wooorm.com
91108

109+
[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
110+
111+
[support]: https://github.com/syntax-tree/.github/blob/master/support.md
112+
113+
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
114+
92115
[hast]: https://github.com/syntax-tree/hast
93116

94-
[contributing]: https://github.com/syntax-tree/hast/blob/master/contributing.md
117+
[node]: https://github.com/syntax-tree/hast#nodes
95118

96-
[coc]: https://github.com/syntax-tree/hast/blob/master/code-of-conduct.md
119+
[element]: https://github.com/syntax-tree/hast#element

0 commit comments

Comments
 (0)