1- # mdast-util-heading-style [ ![ Build Status] ( https://img.shields.io/ travis/wooorm/mdast-util-heading-style.svg )] ( https:// travis-ci.org/wooorm/mdast-util-heading-style ) [ ![ Coverage Status] ( https://img.shields.io/codecov/c/github/wooorm/mdast-util-heading-style.svg )] ( https://codecov.io/github/wooorm/mdast-util-heading-style )
1+ # mdast-util-heading-style [ ![ Build Status] [ travis-badge ]] [ travis ] [ ![ Coverage Status] [ coverage-badge ]] [ coverage ]
22
3- Utility to get the style of an [ ** mdast** ] ( https://github.com/wooorm/mdast )
4- heading.
3+ Utility to get the style of an [ ** mdast** ] [ mdast ] heading.
54
65## Installation
76
8- [ npm] ( https://docs.npmjs.com/cli/ install) :
7+ [ npm] [ npm- install] :
98
109``` bash
1110npm install mdast-util-heading-style
1211```
1312
14- ** mdast-util-heading-style** is also available for [ duo] ( http://duojs.org/#getting-started ) ,
15- and as an AMD, CommonJS, and globals module, [ uncompressed and
16- compressed] ( https://github.com/wooorm/mdast-util-heading-style/ releases) .
13+ ** mdast-util-heading-style** is also available for [ duo] [ ] ,
14+ and as an AMD, CommonJS, and globals module,
15+ [ uncompressed and compressed] [ releases ] .
1716
1817## Usage
1918
@@ -26,25 +25,50 @@ style(remark.parse('# ATX #\n').children[0]); // 'atx-closed'
2625style (remark .parse (' ATX\n ===' ).children [0 ]); // 'setext'
2726
2827style (remark .parse (' ### ATX' ).children [0 ]); // null
29- style (remark .parse (' ### ATX' ).children [0 ], ' setext' ); // 'atx '
28+ style (remark .parse (' ### ATX' ).children [0 ], ' setext' ); // 'setext '
3029```
3130
3231## API
3332
34- ### style(node\ [ , relative] )
33+ ### ` style(node[, relative]) `
3534
3635Get the heading style of a node.
3736
38- Parameters:
37+ ** Parameters** :
3938
40- * ` node ` ([ ` Node ` ] ( https://github.com/wooorm/ mdast/blob/master/doc/nodes.md ) );
39+ * ` node ` ([ ` Node ` ] [ mdast-node ] );
4140
4241* ` relative ` (` string ` , optional) — Style to use for ambiguous headings
4342 (atx-headings with a level of three or more could also be setext).
4443
45- Return: ` string ` (` 'atx' ` , ` 'atx-closed' ` , or ` 'setext' ` ). When an ambiguous
46- heading is found, either ` relative ` or ` null ` is returned.
44+ ** Returns** : ` string ` (` 'atx' ` , ` 'atx-closed' ` , or ` 'setext' ` )
45+ — When an ambiguous heading is found, either ` relative ` or ` null ` is
46+ returned.
4747
4848## License
4949
50- [ MIT] ( LICENSE ) © [ Titus Wormer] ( http://wooorm.com )
50+ [ MIT] [ license ] © [ Titus Wormer] [ home ]
51+
52+ <!-- Definitions -->
53+
54+ [ travis-badge ] : https://img.shields.io/travis/wooorm/mdast-util-heading-style.svg
55+
56+ [ travis ] : https://travis-ci.org/wooorm/mdast-util-heading-style
57+
58+ [ coverage-badge ] : https://img.shields.io/codecov/c/github/wooorm/mdast-util-heading-style.svg
59+
60+ [ coverage ] : https://codecov.io/github/wooorm/mdast-util-heading-style
61+
62+ [ mdast ] : https://github.com/wooorm/mdast
63+
64+ [ mdast-node ] : https://github.com/wooorm/mdast#node
65+
66+ [ npm-install ] : https://docs.npmjs.com/cli/install
67+
68+ [ duo ] : http://duojs.org/#getting-started
69+
70+ [ releases ] : https://github.com/wooorm/mdast-util-heading-style/releases
71+
72+ [ license ] : LICENSE
73+
74+ [ home ] : http://wooorm.com
0 commit comments