8
8
[ ![ Backers] [ backers-badge ]] [ collective ]
9
9
[ ![ Chat] [ chat-badge ]] [ chat ]
10
10
11
+ [ ** mdast** ] [ mdast ] utility to make sure that there is only one top-level heading
12
+ in the document by adjusting headings depths accordingly.
13
+
11
14
Providing multiple top-level headings per single markdown document is confusing
12
15
for tools that assume that there is only a single top-level heading that
13
16
contains some meta-information (usually title) about the document.
14
17
15
- This [ ** mdast** ] [ mdast ] utility makes sure that there is only one top-level
16
- heading in the document by adjusting headings depths accordingly.
17
-
18
- Originally extracted from [ ` remark-man ` ] [ man ] .
19
-
20
- ## Installation
18
+ ## Install
21
19
22
20
[ npm] [ ] :
23
21
24
- ``` bash
22
+ ``` sh
25
23
npm install mdast-normalize-headings
26
24
```
27
25
@@ -63,7 +61,8 @@ Yields:
63
61
64
62
### ` normalizeHeadings(tree) `
65
63
66
- Modifies tree in-place. Returns ` tree ` .
64
+ Modifies [ tree] [ ] in-place.
65
+ Returns ` tree ` .
67
66
68
67
## Related
69
68
@@ -72,11 +71,13 @@ Modifies tree in-place. Returns `tree`.
72
71
73
72
## Contribute
74
73
75
- See [ ` contributing.md ` in ` syntax-tree/unist ` ] [ contributing ] for ways to get
74
+ See [ ` contributing.md ` in ` syntax-tree/.github ` ] [ contributing ] for ways to get
76
75
started.
76
+ See [ ` support.md ` ] [ support ] for ways to get help.
77
77
78
- This organisation has a [ Code of Conduct] [ coc ] . By interacting with this
79
- repository, organisation, or community you agree to abide by its terms.
78
+ This project has a [ Code of Conduct] [ coc ] .
79
+ By interacting with this repository, organisation, or community you agree to
80
+ abide by its terms.
80
81
81
82
## License
82
83
@@ -114,14 +115,16 @@ repository, organisation, or community you agree to abide by its terms.
114
115
115
116
[ license ] : license
116
117
117
- [ contributing ] : https://github.com/syntax-tree/unist /blob/master/contributing.md
118
+ [ contributing ] : https://github.com/syntax-tree/.github /blob/master/contributing.md
118
119
119
- [ coc ] : https://github.com/syntax-tree/unist/blob/master/code-of-conduct.md
120
+ [ support ] : https://github.com/syntax-tree/.github/blob/master/support.md
121
+
122
+ [ coc ] : https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
120
123
121
124
[ mdast ] : https://github.com/syntax-tree/mdast
122
125
123
126
[ remark ] : https://github.com/remarkjs/remark
124
127
125
- [ man ] : https://github.com/remarkjs/remark-man
126
-
127
128
[ normalize-headings ] : https://github.com/remarkjs/remark-normalize-headings
129
+
130
+ [ tree ] : https://github.com/syntax-tree/unist#tree
0 commit comments