Skip to content

Commit a884615

Browse files
committed
Update readme.md
1 parent 895912e commit a884615

File tree

1 file changed

+37
-31
lines changed

1 file changed

+37
-31
lines changed

readme.md

+37-31
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
1-
# mdast-util-to-string [![Build Status][travis-badge]][travis] [![Coverage Status][coverage-badge]][coverage]
1+
# mdast-util-to-string [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status] [![Chat][chat-badge]][chat]
22

3-
[**remark**][remark] utility to get the plain text
4-
content of an [**mdast**][mdast] node.
3+
<!--lint disable list-item-spacing heading-increment list-item-indent-->
4+
5+
Get the plain text content of an [MDAST][] node.
56

67
## Installation
78

8-
[npm][npm-install]:
9+
[npm][]:
910

1011
```bash
1112
npm install mdast-util-to-string
1213
```
1314

14-
**mdast-util-to-string** is also available for [duo][],
15-
and as an AMD, CommonJS, and globals module,
16-
[uncompressed and compressed][releases].
15+
**mdast-util-to-string** is also available as an AMD, CommonJS, and
16+
globals module, [uncompressed and compressed][releases].
1717

1818
## Usage
1919

20-
```js
21-
/*
22-
* Dependencies.
23-
*/
20+
Dependencies:
2421

22+
```js
2523
var remark = require('remark');
2624
var toString = require('mdast-util-to-string');
25+
```
2726

28-
/*
29-
* AST.
30-
*/
27+
Parse:
3128

32-
var ast = remark.parse('Some *emphasis*, **strongness**, and `code`.');
29+
```js
30+
var ast = remark().parse('Some *emphasis*, **strongness**, and `code`.');
31+
```
3332

33+
Stringify:
34+
35+
```js
3436
toString(ast);
3537
// 'Some emphasis, strongness, and code.'
3638
```
@@ -46,40 +48,44 @@ If no value is found, the algorithm checks the children of `node` and
4648
joins them (without spaces or newlines).
4749

4850
> This is not a markdown to plain-text library.
49-
> Use [strip-markdown](https://github.com/wooorm/strip-markdown) for that.
51+
> Use [`strip-markdown`][strip-markdown] for that.
5052
51-
**Parameters**:
53+
###### Parameters
5254

53-
* `node` ([`Node`][mdast-node]).
55+
* `node` ([`Node`][node]) — Node to stringify
5456

55-
**Returns**: `string` — text representation of `node`.
57+
###### Returns
58+
59+
`string` — text representation of `node`.
5660

5761
## License
5862

59-
[MIT][license] © [Titus Wormer][home]
63+
[MIT][license] © [Titus Wormer][author]
6064

6165
<!-- Definitions -->
6266

63-
[travis-badge]: https://img.shields.io/travis/wooorm/mdast-util-to-string.svg
67+
[build-badge]: https://img.shields.io/travis/wooorm/mdast-util-to-string.svg
6468

65-
[travis]: https://travis-ci.org/wooorm/mdast-util-to-string
69+
[build-status]: https://travis-ci.org/wooorm/mdast-util-to-string
6670

6771
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/mdast-util-to-string.svg
6872

69-
[coverage]: https://codecov.io/github/wooorm/mdast-util-to-string
73+
[coverage-status]: https://codecov.io/github/wooorm/mdast-util-to-string
7074

71-
[remark]: https://github.com/wooorm/remark
75+
[chat-badge]: https://img.shields.io/gitter/room/wooorm/remark.svg
7276

73-
[mdast]: https://github.com/wooorm/mdast
77+
[chat]: https://gitter.im/wooorm/remark
78+
79+
[releases]: https://github.com/wooorm/mdast-util-to-string/releases
7480

75-
[mdast-node]: https://github.com/wooorm/mdast#node
81+
[license]: LICENSE
7682

77-
[npm-install]: https://docs.npmjs.com/cli/install
83+
[author]: http://wooorm.com
7884

79-
[duo]: http://duojs.org/#getting-started
85+
[npm]: https://docs.npmjs.com/cli/install
8086

81-
[releases]: https://github.com/wooorm/mdast-util-to-string/releases
87+
[mdast]: https://github.com/wooorm/mdast
8288

83-
[license]: LICENSE
89+
[node]: https://github.com/wooorm/mdast#node
8490

85-
[home]: http://wooorm.com
91+
[strip-markdown]: https://github.com/wooorm/strip-markdown

0 commit comments

Comments
 (0)