Skip to content

Commit b974996

Browse files
committed
Refactor prose
1 parent 70219b4 commit b974996

File tree

1 file changed

+40
-16
lines changed

1 file changed

+40
-16
lines changed

readme.md

+40-16
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
# mdast-util-to-string [![Build][build-badge]][build] [![Coverage][coverage-badge]][coverage] [![Downloads][downloads-badge]][downloads] [![Chat][chat-badge]][chat]
1+
# mdast-util-to-string
22

3-
Get the plain text content of [mdast][] nodes.
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]
410

5-
## Installation
11+
[**mdast**][mdast] utility to get the plain text content of a node.
12+
13+
## Install
614

715
[npm][]:
816

9-
```bash
17+
```sh
1018
npm install mdast-util-to-string
1119
```
1220

@@ -28,11 +36,11 @@ console.log(toString(tree)) // => 'Some emphasis, importance, and code.'
2836

2937
### `toString(node)`
3038

31-
Get the text content of a node.
39+
Get the text content of a [node][].
3240

3341
The algorithm checks `value` of `node`, then `alt`, and finally `title`.
34-
If no value is found, the algorithm checks the children of `node` and
35-
joins them (without spaces or newlines).
42+
If no value is found, the algorithm checks the children of `node` and joins them
43+
(without spaces or newlines).
3644

3745
> This is not a markdown to plain-text library.
3846
> Use [`strip-markdown`][strip-markdown] for that.
@@ -48,11 +56,13 @@ joins them (without spaces or newlines).
4856

4957
## Contribute
5058

51-
See [`contributing.md` in `syntax-tree/mdast`][contributing] for ways to get
59+
See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
5260
started.
61+
See [`support.md`][support] for ways to get help.
5362

54-
This organisation has a [Code of Conduct][coc]. By interacting with this
55-
repository, organisation, or community you agree to abide by its terms.
63+
This project has a [Code of Conduct][coc].
64+
By interacting with this repository, organisation, or community you agree to
65+
abide by its terms.
5666

5767
## License
5868

@@ -72,20 +82,34 @@ repository, organisation, or community you agree to abide by its terms.
7282

7383
[downloads]: https://www.npmjs.com/package/mdast-util-to-string
7484

85+
[size-badge]: https://img.shields.io/bundlephobia/minzip/mdast-util-to-string.svg
86+
87+
[size]: https://bundlephobia.com/result?p=mdast-util-to-string
88+
89+
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
90+
91+
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
92+
93+
[collective]: https://opencollective.com/unified
94+
7595
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
7696

77-
[chat]: https://spectrum.chat/unified/remark
97+
[chat]: https://spectrum.chat/unified/syntax-tree
98+
99+
[npm]: https://docs.npmjs.com/cli/install
78100

79101
[license]: license
80102

81103
[author]: https://wooorm.com
82104

83-
[npm]: https://docs.npmjs.com/cli/install
105+
[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
84106

85-
[mdast]: https://github.com/syntax-tree/mdast
107+
[support]: https://github.com/syntax-tree/.github/blob/master/support.md
108+
109+
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
86110

87-
[strip-markdown]: https://github.com/wooorm/strip-markdown
111+
[mdast]: https://github.com/syntax-tree/mdast
88112

89-
[contributing]: https://github.com/syntax-tree/mdast/blob/master/contributing.md
113+
[node]: https://github.com/syntax-tree/mdast#nodes
90114

91-
[coc]: https://github.com/syntax-tree/mdast/blob/master/code-of-conduct.md
115+
[strip-markdown]: https://github.com/remarkjs/strip-markdown

0 commit comments

Comments
 (0)