1
- # mdast-util-to-string [ ![ Build Status] ( https://img.shields.io/ travis/wooorm/mdast-mdast-util-to-string.svg )] ( https:// travis-ci.org/wooorm/mdast-mdast-util-to-string ) [ ![ Coverage Status] ( https://img.shields.io/codecov/c/github/wooorm/mdast-mdast-util-to-string.svg )] ( https://codecov.io/github/wooorm/mdast-mdast-util-to-string )
1
+ # mdast-util-to-string [ ![ Build Status] [ travis-badge ]] [ travis ] [ ![ Coverage Status] [ coverage-badge ]] [ coverage ]
2
2
3
- [ ** remark** ] ( https://github.com/wooorm/ remark) utility to get the plain text
4
- content of an [ ** mdast** ] ( https://github.com/wooorm/ mdast) node.
3
+ [ ** remark** ] [ remark ] utility to get the plain text
4
+ content of an [ ** mdast** ] [ mdast ] node.
5
5
6
6
## Installation
7
7
8
- [ npm] ( https://docs.npmjs.com/cli/ install) :
8
+ [ npm] [ npm- install] :
9
9
10
10
``` bash
11
11
npm install mdast-util-to-string
12
12
```
13
13
14
- ** mdast-util-to-string** is also available for
15
- [ duo] ( http://duojs.org/#getting-started ) , and as an AMD, CommonJS, and globals
16
- module, [ uncompressed and
17
- compressed] ( https://github.com/wooorm/mdast-util-to-string/releases ) .
14
+ ** mdast-util-to-string** is also available for [ duo] [ ] ,
15
+ and as an AMD, CommonJS, and globals module,
16
+ [ uncompressed and compressed] [ releases ] .
18
17
19
18
## Usage
20
19
@@ -38,23 +37,49 @@ toString(ast);
38
37
39
38
## API
40
39
41
- ### toString(node)
40
+ ### ` toString(node) `
42
41
43
42
Get the text content of a node.
44
43
45
- The algorithm checks the value of ` node ` , then its ` alt ` , and then
46
- its ` title ` , in that order. If no value is found, the algorithm checks
47
- the children of ` node ` and joins them (without spaces or newlines).
44
+ The algorithm checks ` value ` of ` node ` , then ` alt ` , and finally ` title ` .
45
+ If no value is found, the algorithm checks the children of ` node ` and
46
+ joins them (without spaces or newlines).
48
47
49
48
> This is not a markdown to plain-text library.
50
49
> Use [ strip-markdown] ( https://github.com/wooorm/strip-markdown ) for that.
51
50
52
- Parameters:
51
+ ** Parameters** :
53
52
54
- * ` node ` (` Node ` ) — [ ** mdast** node] ( https://github.com/wooorm/mdast#node ) ;
53
+ * ` node ` ([ ` Node ` ] [ mdast- node ] ).
55
54
56
- Returns: ` string ` — text representation of ` node ` .
55
+ ** Returns** : ` string ` — text representation of ` node ` .
57
56
58
57
## License
59
58
60
- [ MIT] ( LICENSE ) © [ Titus Wormer] ( http://wooorm.com )
59
+ [ MIT] [ license ] © [ Titus Wormer] [ home ]
60
+
61
+ <!-- Definitions -->
62
+
63
+ [ travis-badge ] : https://img.shields.io/travis/wooorm/mdast-util-to-string.svg
64
+
65
+ [ travis ] : https://travis-ci.org/wooorm/mdast-util-to-string
66
+
67
+ [ coverage-badge ] : https://img.shields.io/codecov/c/github/wooorm/mdast-util-to-string.svg
68
+
69
+ [ coverage ] : https://codecov.io/github/wooorm/mdast-util-to-string
70
+
71
+ [ remark ] : https://github.com/wooorm/remark
72
+
73
+ [ mdast ] : https://github.com/wooorm/mdast
74
+
75
+ [ mdast-node ] : https://github.com/wooorm/mdast#node
76
+
77
+ [ npm-install ] : https://docs.npmjs.com/cli/install
78
+
79
+ [ duo ] : http://duojs.org/#getting-started
80
+
81
+ [ releases ] : https://github.com/wooorm/mdast-util-to-string/releases
82
+
83
+ [ license ] : LICENSE
84
+
85
+ [ home ] : http://wooorm.com
0 commit comments