@@ -25,6 +25,8 @@ Alternatively, the extensions can be used separately:
25
25
26
26
* [ ` syntax-tree/mdast-util-gfm-autolink-literal ` ] ( https://github.com/syntax-tree/mdast-util-gfm-autolink-literal )
27
27
— support GFM autolink literals
28
+ * [ ` syntax-tree/mdast-util-gfm-footnote ` ] ( https://github.com/syntax-tree/mdast-util-gfm-footnote )
29
+ — support GFM footnotes
28
30
* [ ` syntax-tree/mdast-util-gfm-strikethrough ` ] ( https://github.com/syntax-tree/mdast-util-gfm-strikethrough )
29
31
— support GFM strikethrough
30
32
* [ ` syntax-tree/mdast-util-gfm-table ` ] ( https://github.com/syntax-tree/mdast-util-gfm-table )
@@ -54,6 +56,12 @@ Say we have the following file, `example.md`:
54
56
55
57
www.example.com, https://example.com, and
[email protected] .
56
58
59
+ ## Footnote
60
+
61
+ A note[^1]
62
+
63
+ [^1]: Big note.
64
+
57
65
## Strikethrough
58
66
59
67
~one~ or ~~two~~ tildes.
@@ -130,6 +138,22 @@ Now, running `node example` yields:
130
138
{type: ' text' , value: ' .' }
131
139
]
132
140
},
141
+ {type: ' heading' , depth: 2 , children: [{type: ' text' , value: ' Footnote' }]},
142
+ {
143
+ type: ' paragraph' ,
144
+ children: [
145
+ {type: ' text' , value: ' A note' },
146
+ {type: ' footnoteReference' , identifier: ' 1' , label: ' 1' }
147
+ ]
148
+ },
149
+ {
150
+ type: ' footnoteDefinition' ,
151
+ identifier: ' 1' ,
152
+ label: ' 1' ,
153
+ children: [
154
+ {type: ' paragraph' , children: [{type: ' text' , value: ' Big note.' }]}
155
+ ]
156
+ },
133
157
{
134
158
type: ' heading' ,
135
159
depth: 2 ,
@@ -202,6 +226,12 @@ Now, running `node example` yields:
202
226
203
227
[www.example.com](http://www.example.com), <https://example.com>, and <
[email protected] >.
204
228
229
+ ## Footnote
230
+
231
+ A note[^1]
232
+
233
+ [^1]: Big note.
234
+
205
235
## Strikethrough
206
236
207
237
~~one~~ or ~~two~~ tildes.
0 commit comments