|
1 |
| -# mdast-util-heading-style [![Build Status][travis-badge]][travis] [![Coverage Status][coverage-badge]][coverage] |
| 1 | +# mdast-util-heading-style [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status] [![Chat][chat-badge]][chat] |
2 | 2 |
|
3 |
| -Utility to get the style of an [**mdast**][mdast] heading. |
| 3 | +<!--lint disable list-item-spacing heading-increment list-item-indent--> |
| 4 | + |
| 5 | +Get the style of an [**MDAST**][mdast] heading. |
4 | 6 |
|
5 | 7 | ## Installation
|
6 | 8 |
|
7 |
| -[npm][npm-install]: |
| 9 | +[npm][]: |
8 | 10 |
|
9 | 11 | ```bash
|
10 | 12 | npm install mdast-util-heading-style
|
@@ -33,39 +35,55 @@ style(remark.parse('### ATX').children[0], 'setext'); // 'setext'
|
33 | 35 |
|
34 | 36 | Get the heading style of a node.
|
35 | 37 |
|
36 |
| -**Parameters**: |
37 |
| - |
38 |
| -* `node` ([`Node`][mdast-node]); |
| 38 | +###### Parameters |
39 | 39 |
|
| 40 | +* `node` ([`Node`][node]) — Node to parse; |
40 | 41 | * `relative` (`string`, optional) — Style to use for ambiguous headings
|
41 | 42 | (atx-headings with a level of three or more could also be setext).
|
42 | 43 |
|
43 |
| -**Returns**: `string` (`'atx'`, `'atx-closed'`, or `'setext'`) |
44 |
| -— When an ambiguous heading is found, either `relative` or `null` is |
45 |
| -returned. |
| 44 | +###### Returns |
| 45 | + |
| 46 | +`string` (`'atx'`, `'atx-closed'`, or `'setext'`) — When an ambiguous |
| 47 | +heading is found, either `relative` or `null` is returned. |
| 48 | + |
| 49 | +### `Marker` |
| 50 | + |
| 51 | +A comment marker. |
| 52 | + |
| 53 | +###### Properties |
| 54 | + |
| 55 | +* `name` (`string`) — Name of marker; |
| 56 | +* `attributes` (`string`) — Value after name; |
| 57 | +* `parameters` (`Object`) — Parsed attributes, tries to convert |
| 58 | + values to numbers and booleans when possible; |
| 59 | +* `node` ([`Node`][node]) — Reference to given node. |
46 | 60 |
|
47 | 61 | ## License
|
48 | 62 |
|
49 |
| -[MIT][license] © [Titus Wormer][home] |
| 63 | +[MIT][license] © [Titus Wormer][author] |
50 | 64 |
|
51 | 65 | <!-- Definitions -->
|
52 | 66 |
|
53 |
| -[travis-badge]: https://img.shields.io/travis/wooorm/mdast-util-heading-style.svg |
| 67 | +[build-badge]: https://img.shields.io/travis/wooorm/mdast-util-heading-style.svg |
54 | 68 |
|
55 |
| -[travis]: https://travis-ci.org/wooorm/mdast-util-heading-style |
| 69 | +[build-status]: https://travis-ci.org/wooorm/mdast-util-heading-style |
56 | 70 |
|
57 | 71 | [coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/mdast-util-heading-style.svg
|
58 | 72 |
|
59 |
| -[coverage]: https://codecov.io/github/wooorm/mdast-util-heading-style |
| 73 | +[coverage-status]: https://codecov.io/github/wooorm/mdast-util-heading-style |
60 | 74 |
|
61 |
| -[mdast]: https://github.com/wooorm/mdast |
62 |
| - |
63 |
| -[mdast-node]: https://github.com/wooorm/mdast#node |
| 75 | +[chat-badge]: https://img.shields.io/gitter/room/wooorm/remark.svg |
64 | 76 |
|
65 |
| -[npm-install]: https://docs.npmjs.com/cli/install |
| 77 | +[chat]: https://gitter.im/wooorm/remark |
66 | 78 |
|
67 | 79 | [releases]: https://github.com/wooorm/mdast-util-heading-style/releases
|
68 | 80 |
|
69 | 81 | [license]: LICENSE
|
70 | 82 |
|
71 |
| -[home]: http://wooorm.com |
| 83 | +[author]: http://wooorm.com |
| 84 | + |
| 85 | +[npm]: https://docs.npmjs.com/cli/install |
| 86 | + |
| 87 | +[mdast]: https://github.com/wooorm/mdast |
| 88 | + |
| 89 | +[node]: https://github.com/wooorm/mdast#node |
0 commit comments