@@ -15,7 +15,6 @@ import {
15
15
linkify_headings ,
16
16
strip_h1 ,
17
17
increment_headings ,
18
- validate_headings ,
19
18
} from "./headings" ;
20
19
21
20
const { process : linkify_only } = unified ( )
@@ -53,7 +52,7 @@ _headings("transforms and formats headings", async () => {
53
52
54
53
assert . equal (
55
54
output . contents ,
56
- `<h3><span id="section-hello" class="offset-anchor"></span><a href="http://github.com/blog#section-hello" class="anchor" aria-hidden></a >hello</h3>`
55
+ `<h3 id="section-hello">hello</h3>`
57
56
) ;
58
57
} ) ;
59
58
@@ -81,8 +80,8 @@ _headings("transforms and formats multi-level headings", async () => {
81
80
82
81
assert . equal (
83
82
output . contents ,
84
- `<h3><span id="subsection" class="offset-anchor"></span><a href="http://github.com/blog#subsection" class="anchor" aria-hidden></a >subsection</h3>
85
- <h4><span id="subsection-subsubsection" class="offset-anchor"></span><a href="http://github.com/blog#subsection-subsubsection" class="anchor" aria-hidden></a >subsubsection</h4>`
83
+ `<h3 id="subsection">subsection</h3>
84
+ <h4 id="subsection-subsubsection">subsubsection</h4>`
86
85
) ;
87
86
} ) ;
88
87
@@ -113,9 +112,9 @@ _headings("transforms and formats multi-level headings", async () => {
113
112
114
113
assert . equal (
115
114
output . contents ,
116
- `<h3><span id="subsection" class="offset-anchor"></span><a href="http://github.com/blog#subsection" class="anchor" aria-hidden></a >subsection</h3>
117
- <h4><span id="subsection-subsubsection" class="offset-anchor"></span><a href="http://github.com/blog#subsection-subsubsection" class="anchor" aria-hidden></a >subsubsection</h4>
118
- <h5><span id="subsection-subsubsection-subsubsubsection" class="offset-anchor" data-scrollignore></span><a href="http://github.com/blog#subsection-subsubsection-subsubsubsection" class="anchor" aria-hidden></a >subsubsubsection</h5>`
115
+ `<h3 id="subsection">subsection</h3>
116
+ <h4 id="subsection-subsubsection">subsubsection</h4>
117
+ <h5 id="subsection-subsubsection-subsubsubsection">subsubsubsection</h5>`
119
118
) ;
120
119
} ) ;
121
120
@@ -154,13 +153,13 @@ _headings("transforms and formats multi-level headings", async () => {
154
153
155
154
assert . equal (
156
155
output . contents ,
157
- `<h3><span id="subsection" class="offset-anchor"></span><a href="http://github.com/blog#subsection" class="anchor" aria-hidden></a >subsection</h3>
158
- <h4><span id="subsection-subsubsection" class="offset-anchor"></span><a href="http://github.com/blog#subsection-subsubsection" class="anchor" aria-hidden></a >subsubsection</h4>
159
- <h5><span id="subsection-subsubsection-subsubsubsection" class="offset-anchor" data-scrollignore></span><a href="http://github.com/blog#subsection-subsubsection-subsubsubsection" class="anchor" aria-hidden></a >subsubsubsection</h5>
160
- <h3><span id="one" class="offset-anchor"></span><a href="http://github.com/blog#one" class="anchor" aria-hidden></a >one</h3>
161
- <h4><span id="one-two" class="offset-anchor"></span><a href="http://github.com/blog#one-two" class="anchor" aria-hidden></a >two</h4>
162
- <h5><span id="one-two-three" class="offset-anchor" data-scrollignore></span><a href="http://github.com/blog#one-two-three" class="anchor" aria-hidden></a >three</h5>
163
- <h4><span id="one-four" class="offset-anchor"></span><a href="http://github.com/blog#one-four" class="anchor" aria-hidden></a >four</h4>`
156
+ `<h3 id="subsection">subsection</h3>
157
+ <h4 id="subsection-subsubsection">subsubsection</h4>
158
+ <h5 id="subsection-subsubsection-subsubsubsection">subsubsubsection</h5>
159
+ <h3 id="one">one</h3>
160
+ <h4 id="one-two">two</h4>
161
+ <h5 id="one-two-three">three</h5>
162
+ <h4 id="one-four">four</h4>`
164
163
) ;
165
164
} ) ;
166
165
@@ -201,13 +200,13 @@ _headings(
201
200
202
201
assert . equal (
203
202
output . contents ,
204
- `<h2><span id="subsection" class="offset-anchor"></span><a href="http://github.com/blog#subsection" class="anchor" aria-hidden></a >subsection</h2>
205
- <h3><span id="subsection-subsubsection" class="offset-anchor"></span><a href="http://github.com/blog#subsection-subsubsection" class="anchor" aria-hidden></a >subsubsection</h3>
206
- <h4><span id="subsection-subsubsection-subsubsubsection" class="offset-anchor" data-scrollignore></span><a href="http://github.com/blog#subsection-subsubsection-subsubsubsection" class="anchor" aria-hidden></a >subsubsubsection</h4>
207
- <h2><span id="one" class="offset-anchor"></span><a href="http://github.com/blog#one" class="anchor" aria-hidden></a >one</h2>
208
- <h3><span id="one-two" class="offset-anchor"></span><a href="http://github.com/blog#one-two" class="anchor" aria-hidden></a >two</h3>
209
- <h4><span id="one-two-three" class="offset-anchor" data-scrollignore></span><a href="http://github.com/blog#one-two-three" class="anchor" aria-hidden></a >three</h4>
210
- <h3><span id="one-four" class="offset-anchor"></span><a href="http://github.com/blog#one-four" class="anchor" aria-hidden></a >four</h3>`
203
+ `<h2 id="subsection">subsection</h2>
204
+ <h3 id="subsection-subsubsection">subsubsection</h3>
205
+ <h4 id="subsection-subsubsection-subsubsubsection">subsubsubsection</h4>
206
+ <h2 id="one">one</h2>
207
+ <h3 id="one-two">two</h3>
208
+ <h4 id="one-two-three">three</h4>
209
+ <h3 id="one-four">four</h3>`
211
210
) ;
212
211
}
213
212
) ;
@@ -242,10 +241,10 @@ _headings(
242
241
243
242
assert . equal (
244
243
output . contents ,
245
- `<h3><span id="component-format-script" class="offset-anchor"></span><a href="http://github.com/docs#component-format-script" class="anchor" aria-hidden></a >script</h3>
246
- <h4><span id="component-format-script-one" class="offset-anchor"></span><a href="http://github.com/docs#component-format-script-one" class="anchor" aria-hidden></a >one</h4>
247
- <h5><span id="component-format-script-one-two" class="offset-anchor" data-scrollignore></span><a href="http://github.com/docs#component-format-script-one-two" class="anchor" aria-hidden></a >two</h5>
248
- <h3><span id="component-format-style" class="offset-anchor"></span><a href="http://github.com/docs#component-format-style" class="anchor" aria-hidden></a >style</h3>`
244
+ `<h3 id="component-format-script">script</h3>
245
+ <h4 id="component-format-script-one">one</h4>
246
+ <h5 id="component-format-script-one-two">two</h5>
247
+ <h3 id="component-format-style">style</h3>`
249
248
) ;
250
249
251
250
//@ts -ignore
0 commit comments