1
- # mdast-util-heading-range [ ![ Build Status ] [ build-badge ]] [ build-status ] [ ![ Coverage Status ] [ coverage-badge ]] [ coverage-status ] [ ![ Chat ] [ chat-badge ]] [ chat ]
1
+ # mdast-util-heading-range
2
2
3
- Markdown heading as ranges in [ ** mdast** ] [ mdast ] .
3
+ [ ![ Build] [ build-badge ]] [ build ]
4
+ [ ![ Coverage] [ coverage-badge ]] [ coverage ]
5
+ [ ![ Downloads] [ downloads-badge ]] [ downloads ]
6
+ [ ![ Size] [ size-badge ]] [ size ]
7
+ [ ![ Sponsors] [ sponsors-badge ]] [ collective ]
8
+ [ ![ Backers] [ backers-badge ]] [ collective ]
9
+ [ ![ Chat] [ chat-badge ]] [ chat ]
4
10
5
- ## Installation
11
+ [ ** mdast** ] [ mdast ] utility to use headings as ranges.
12
+
13
+ ## Install
6
14
7
15
[ npm] [ ] :
8
16
@@ -14,7 +22,7 @@ npm install mdast-util-heading-range
14
22
15
23
Say we have the following file, ` example.md ` :
16
24
17
- ``` markdown
25
+ ``` md
18
26
# Foo
19
27
20
28
Bar.
24
32
25
33
And our script, ` example.js ` , looks as follows:
26
34
27
- ``` javascript
35
+ ``` js
28
36
var vfile = require (' to-vfile' )
29
37
var remark = require (' remark' )
30
38
var heading = require (' mdast-util-heading-range' )
@@ -55,7 +63,7 @@ function plugin() {
55
63
56
64
Now, running ` node example ` yields:
57
65
58
- ``` markdown
66
+ ``` md
59
67
# Foo
60
68
61
69
Qux.
69
77
70
78
Search ` tree ` ([ ` Node ` ] [ node ] ) and transform a section without affecting other
71
79
parts with ` onrun ` ([ ` Function ` ] [ onrun ] ).
72
- A Section is a heading that passes ` test ` , until the next heading of the same
73
- or lower depth, or the end of the document. If ` ignoreFinalDefinitions: true ` ,
74
- final definitions “in” the section are excluded.
80
+ A “section” is a heading that passes ` test ` , until the next heading of the same
81
+ or lower depth, or the end of the document.
82
+ If ` ignoreFinalDefinitions: true ` , final definitions “in” the section are
83
+ excluded.
75
84
76
85
##### ` options `
77
86
@@ -122,11 +131,13 @@ Extra info (`Object`):
122
131
123
132
## Contribute
124
133
125
- See [ ` contributing.md ` in ` syntax-tree/mdast ` ] [ contributing ] for ways to get
134
+ See [ ` contributing.md ` in ` syntax-tree/.github ` ] [ contributing ] for ways to get
126
135
started.
136
+ See [ ` support.md ` ] [ support ] for ways to get help.
127
137
128
- This organisation has a [ Code of Conduct] [ coc ] . By interacting with this
129
- repository, organisation, or community you agree to abide by its terms.
138
+ This project has a [ Code of Conduct] [ coc ] .
139
+ By interacting with this repository, organisation, or community you agree to
140
+ abide by its terms.
130
141
131
142
## License
132
143
@@ -136,21 +147,41 @@ repository, organisation, or community you agree to abide by its terms.
136
147
137
148
[ build-badge ] : https://img.shields.io/travis/syntax-tree/mdast-util-heading-range.svg
138
149
139
- [ build-status ] : https://travis-ci.org/syntax-tree/mdast-util-heading-range
150
+ [ build ] : https://travis-ci.org/syntax-tree/mdast-util-heading-range
140
151
141
152
[ coverage-badge ] : https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-heading-range.svg
142
153
143
- [ coverage-status ] : https://codecov.io/github/syntax-tree/mdast-util-heading-range
154
+ [ coverage ] : https://codecov.io/github/syntax-tree/mdast-util-heading-range
155
+
156
+ [ downloads-badge ] : https://img.shields.io/npm/dm/mdast-util-heading-range.svg
157
+
158
+ [ downloads ] : https://www.npmjs.com/package/mdast-util-heading-range
159
+
160
+ [ size-badge ] : https://img.shields.io/bundlephobia/minzip/mdast-util-heading-range.svg
161
+
162
+ [ size ] : https://bundlephobia.com/result?p=mdast-util-heading-range
163
+
164
+ [ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
165
+
166
+ [ backers-badge ] : https://opencollective.com/unified/backers/badge.svg
167
+
168
+ [ collective ] : https://opencollective.com/unified
144
169
145
- [ chat-badge ] : https://img.shields.io/gitter/room/wooorm/remark .svg
170
+ [ chat-badge ] : https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff .svg
146
171
147
- [ chat ] : https://gitter.im/wooorm/remark
172
+ [ chat ] : https://spectrum.chat/unified/syntax-tree
173
+
174
+ [ npm ] : https://docs.npmjs.com/cli/install
148
175
149
176
[ license ] : license
150
177
151
178
[ author ] : https://wooorm.com
152
179
153
- [ npm ] : https://docs.npmjs.com/cli/install
180
+ [ contributing ] : https://github.com/syntax-tree/.github/blob/master/contributing.md
181
+
182
+ [ support ] : https://github.com/syntax-tree/.github/blob/master/support.md
183
+
184
+ [ coc ] : https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
154
185
155
186
[ mdast ] : https://github.com/syntax-tree/mdast
156
187
@@ -161,7 +192,3 @@ repository, organisation, or community you agree to abide by its terms.
161
192
[ heading ] : https://github.com/syntax-tree/mdast#heading
162
193
163
194
[ test ] : #function-testvalue-node
164
-
165
- [ contributing ] : https://github.com/syntax-tree/mdast/blob/master/contributing.md
166
-
167
- [ coc ] : https://github.com/syntax-tree/mdast/blob/master/code-of-conduct.md
0 commit comments