@@ -25,6 +25,8 @@ Alternatively, the extensions can be used separately:
2525
2626* [ ` syntax-tree/mdast-util-gfm-autolink-literal ` ] ( https://github.com/syntax-tree/mdast-util-gfm-autolink-literal )
2727 — support GFM autolink literals
28+ * [ ` syntax-tree/mdast-util-gfm-footnote ` ] ( https://github.com/syntax-tree/mdast-util-gfm-footnote )
29+ — support GFM footnotes
2830* [ ` syntax-tree/mdast-util-gfm-strikethrough ` ] ( https://github.com/syntax-tree/mdast-util-gfm-strikethrough )
2931 — support GFM strikethrough
3032* [ ` 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`:
5456
5557www.example.com, https://example.com, and contact@example.com.
5658
59+ ## Footnote
60+
61+ A note[^1]
62+
63+ [^1]: Big note.
64+
5765## Strikethrough
5866
5967~one~ or ~~two~~ tildes.
@@ -130,6 +138,22 @@ Now, running `node example` yields:
130138 {type: ' text' , value: ' .' }
131139 ]
132140 },
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+ },
133157 {
134158 type: ' heading' ,
135159 depth: 2 ,
@@ -202,6 +226,12 @@ Now, running `node example` yields:
202226
203227[www.example.com](http://www.example.com), <https://example.com>, and <contact@example.com>.
204228
229+ ## Footnote
230+
231+ A note[^1]
232+
233+ [^1]: Big note.
234+
205235## Strikethrough
206236
207237~~one~~ or ~~two~~ tildes.
0 commit comments