Skip to content

Commit 0e8aa71

Browse files
vhfwooorm
authored andcommitted
Wrap footnote definition in a paragraph
Closes GH-14. Closes GH-15. Amended-by: Titus Wormer <[email protected]>
1 parent 76d4041 commit 0e8aa71

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/handlers/footnote.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ function footnote(h, node) {
2525
footnotes.push({
2626
type: 'footnoteDefinition',
2727
identifier: identifier,
28-
children: node.children,
28+
children: [{
29+
type: 'paragraph',
30+
children: node.children
31+
}],
2932
position: node.position
3033
});
3134

test/footnote.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ test('Footnote', function (t) {
3333
properties: {id: 'fn-1'}
3434
}, [
3535
u('text', '\n'),
36-
u('text', 'bravo'),
36+
u('element', {tagName: 'p', properties: {}}, [u('text', 'bravo')]),
3737
u('text', '\n'),
3838
u('element', {
3939
tagName: 'a',
@@ -108,7 +108,7 @@ test('Footnote', function (t) {
108108
properties: {id: 'fn-2'}
109109
}, [
110110
u('text', '\n'),
111-
u('text', 'charlie'),
111+
u('element', {tagName: 'p', properties: {}}, [u('text', 'charlie')]),
112112
u('text', '\n'),
113113
u('element', {
114114
tagName: 'a',

0 commit comments

Comments
 (0)