Skip to content

Commit c13fe7f

Browse files
committed
Change to remove support for Footnote nodes
1 parent 6fc783a commit c13fe7f

File tree

5 files changed

+0
-164
lines changed

5 files changed

+0
-164
lines changed

lib/handlers/footnote.js

Lines changed: 0 additions & 48 deletions
This file was deleted.

lib/handlers/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {code} from './code.js'
44
import {strikethrough} from './delete.js'
55
import {emphasis} from './emphasis.js'
66
import {footnoteReference} from './footnote-reference.js'
7-
import {footnote} from './footnote.js'
87
import {heading} from './heading.js'
98
import {html} from './html.js'
109
import {imageReference} from './image-reference.js'
@@ -33,7 +32,6 @@ export const handlers = {
3332
delete: strikethrough,
3433
emphasis,
3534
footnoteReference,
36-
footnote,
3735
heading,
3836
html,
3937
imageReference,

test/footnote-mixed.js

Lines changed: 0 additions & 54 deletions
This file was deleted.

test/footnote.js

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -8,65 +8,6 @@ import {toHast} from '../index.js'
88

99
test('footnote', async function (t) {
1010
await t.test('should render `footnote`s (#1)', async function () {
11-
const tree = toHast({
12-
type: 'root',
13-
// @ts-expect-error: to do: remove `footnote`s.
14-
children: [{type: 'footnote', children: [{type: 'text', value: 'alpha'}]}]
15-
})
16-
assert(tree, 'expected node')
17-
assert.equal(
18-
// @ts-expect-error: to do: remove when `to-html` is released.
19-
toHtml(tree),
20-
`<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup>
21-
<section data-footnotes class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2>
22-
<ol>
23-
<li id="user-content-fn-1">
24-
<p>alpha <a href="#user-content-fnref-1" data-footnote-backref class="data-footnote-backref" aria-label="Back to content">↩</a></p>
25-
</li>
26-
</ol>
27-
</section>`
28-
)
29-
})
30-
31-
await t.test('should render `footnote`s (#2)', async function () {
32-
const tree = toHast({
33-
type: 'root',
34-
children: [
35-
{
36-
type: 'footnoteDefinition',
37-
identifier: '1',
38-
children: [
39-
{type: 'paragraph', children: [{type: 'text', value: 'bravo'}]}
40-
]
41-
},
42-
{
43-
type: 'paragraph',
44-
children: [{type: 'footnoteReference', identifier: '1'}]
45-
},
46-
// @ts-expect-error: to do: remove `footnote`s.
47-
{type: 'footnote', children: [{type: 'text', value: 'charlie'}]}
48-
]
49-
})
50-
assert(tree, 'expected node')
51-
assert.equal(
52-
// @ts-expect-error: to do: remove when `to-html` is released.
53-
toHtml(tree),
54-
`<p><sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="footnote-label">1</a></sup></p>
55-
<sup><a href="#user-content-fn-2" id="user-content-fnref-2" data-footnote-ref aria-describedby="footnote-label">2</a></sup>
56-
<section data-footnotes class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2>
57-
<ol>
58-
<li id="user-content-fn-1">
59-
<p>bravo <a href="#user-content-fnref-1" data-footnote-backref class="data-footnote-backref" aria-label="Back to content">↩</a></p>
60-
</li>
61-
<li id="user-content-fn-2">
62-
<p>charlie <a href="#user-content-fnref-2" data-footnote-backref class="data-footnote-backref" aria-label="Back to content">↩</a></p>
63-
</li>
64-
</ol>
65-
</section>`
66-
)
67-
})
68-
69-
await t.test('should render `footnote`s (#3)', async function () {
7011
const tree = toHast({
7112
type: 'root',
7213
children: [

test/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import './delete.js'
88
import './emphasis.js'
99
import './footnote-definition.js'
1010
import './footnote-reference.js'
11-
import './footnote-mixed.js'
1211
import './footnote.js'
1312
import './heading.js'
1413
import './html.js'

0 commit comments

Comments
 (0)