@@ -9,10 +9,12 @@ import {toHast} from '../index.js'
9
9
test ( 'footnote' , ( ) => {
10
10
let tree = toHast ( {
11
11
type : 'root' ,
12
+ // @ts -expect-error: to do: remove `footnote`s.
12
13
children : [ { type : 'footnote' , children : [ { type : 'text' , value : 'alpha' } ] } ]
13
14
} )
14
15
assert ( tree , 'expected node' )
15
16
assert . equal (
17
+ // @ts -expect-error: to do: remove when `to-html` is released.
16
18
toHtml ( tree ) ,
17
19
`<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup>
18
20
<section data-footnotes class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2>
@@ -39,11 +41,13 @@ test('footnote', () => {
39
41
type : 'paragraph' ,
40
42
children : [ { type : 'footnoteReference' , identifier : '1' } ]
41
43
} ,
44
+ // @ts -expect-error: to do: remove `footnote`s.
42
45
{ type : 'footnote' , children : [ { type : 'text' , value : 'charlie' } ] }
43
46
]
44
47
} )
45
48
assert ( tree , 'expected node' )
46
49
assert . equal (
50
+ // @ts -expect-error: to do: remove when `to-html` is released.
47
51
toHtml ( tree ) ,
48
52
`<p><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup></p>
49
53
<sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref aria-describedby="footnote-label">2</a></sup>
@@ -83,6 +87,7 @@ test('footnote', () => {
83
87
} )
84
88
assert ( tree , 'expected node' )
85
89
assert . equal (
90
+ // @ts -expect-error: to do: remove when `to-html` is released.
86
91
toHtml ( tree ) ,
87
92
`<p><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup></p>
88
93
<section data-footnotes class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2>
@@ -112,6 +117,7 @@ test('footnote', () => {
112
117
)
113
118
assert ( tree , 'expected node' )
114
119
assert . equal (
120
+ // @ts -expect-error: to do: remove when `to-html` is released.
115
121
toHtml ( tree ) ,
116
122
`<table>
117
123
<thead>
@@ -153,6 +159,7 @@ test('footnote', () => {
153
159
)
154
160
assert ( tree , 'expected node' )
155
161
assert . equal (
162
+ // @ts -expect-error: to do: remove when `to-html` is released.
156
163
toHtml ( tree ) ,
157
164
`<table>
158
165
<thead>
@@ -183,6 +190,7 @@ test('footnote', () => {
183
190
)
184
191
assert ( tree , 'expected node' )
185
192
assert . equal (
193
+ // @ts -expect-error: to do: remove when `to-html` is released.
186
194
toHtml ( tree ) ,
187
195
`<p>Call<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup><sup><a href="#user-content-fn-1" id="user-content-fnref-1-2" data-footnote-ref aria-describedby="footnote-label">1</a></sup></p>
188
196
<section data-footnotes class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2>
@@ -204,6 +212,7 @@ test('footnote', () => {
204
212
)
205
213
assert ( tree , 'expected node' )
206
214
assert . equal (
215
+ // @ts -expect-error: to do: remove when `to-html` is released.
207
216
toHtml ( tree ) ,
208
217
`<p><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup></p>
209
218
<section data-footnotes class="footnotes"><h2 class="sr-only" id="footnote-label">Voetnoten</h2>
@@ -225,6 +234,7 @@ test('footnote', () => {
225
234
)
226
235
assert ( tree , 'expected node' )
227
236
assert . equal (
237
+ // @ts -expect-error: to do: remove when `to-html` is released.
228
238
toHtml ( tree ) ,
229
239
`<p><sup><a href="#fn-1" id="fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup></p>
230
240
<section data-footnotes class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2>
@@ -246,6 +256,7 @@ test('footnote', () => {
246
256
)
247
257
assert ( tree , 'expected node' )
248
258
assert . equal (
259
+ // @ts -expect-error: to do: remove when `to-html` is released.
249
260
toHtml ( tree ) ,
250
261
`<p><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup></p>
251
262
<section data-footnotes class="footnotes"><h1 class="sr-only" id="footnote-label">Footnotes</h1>
@@ -267,6 +278,7 @@ test('footnote', () => {
267
278
)
268
279
assert ( tree , 'expected node' )
269
280
assert . equal (
281
+ // @ts -expect-error: to do: remove when `to-html` is released.
270
282
toHtml ( tree ) ,
271
283
`<p><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup></p>
272
284
<section data-footnotes class="footnotes"><h2 id="footnote-label">Footnotes</h2>
@@ -290,6 +302,7 @@ test('footnote', () => {
290
302
)
291
303
assert ( tree , 'expected node' )
292
304
assert . equal (
305
+ // @ts -expect-error: to do: remove when `to-html` is released.
293
306
toHtml ( tree ) ,
294
307
`<p>a<sup><a href="#user-content-fn-__proto__" id="user-content-fnref-__proto__" data-footnote-ref aria-describedby="footnote-label">1</a></sup> b<sup><a href="#user-content-fn-__proto__" id="user-content-fnref-__proto__-2" data-footnote-ref aria-describedby="footnote-label">1</a></sup> c<sup><a href="#user-content-fn-constructor" id="user-content-fnref-constructor" data-footnote-ref aria-describedby="footnote-label">2</a></sup></p>
295
308
<section data-footnotes class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2>
0 commit comments