From c8cd11e0486a5d1a2308de5491d416e00d361f1c Mon Sep 17 00:00:00 2001
From: Brett Walker <bwalker@gitlab.com>
Date: Tue, 31 Oct 2023 20:52:01 +0000
Subject: [PATCH] Markdown: Add full footnote spec to internal GLFM specs

---
 .../glfm_internal_extensions.md               | 228 ++++++++
 .../examples_index.yml                        |  24 +
 .../output_example_snapshots/html.yml         | 275 +++++++++
 .../output_example_snapshots/markdown.yml     |  71 +++
 .../prosemirror_json.yml                      | 524 ++++++++++++++++++
 .../snapshot_spec.html                        | 272 +++++++++
 .../output_example_snapshots/snapshot_spec.md | 228 ++++++++
 7 files changed, 1622 insertions(+)

diff --git a/glfm_specification/input/gitlab_flavored_markdown/glfm_internal_extensions.md b/glfm_specification/input/gitlab_flavored_markdown/glfm_internal_extensions.md
index 266e1c7723daa..e7453d8c556d0 100644
--- a/glfm_specification/input/gitlab_flavored_markdown/glfm_internal_extensions.md
+++ b/glfm_specification/input/gitlab_flavored_markdown/glfm_internal_extensions.md
@@ -777,4 +777,232 @@ footnote text
 </section>
 ````````````````````````````````
 
+# GFM undocumented extensions and more robust test
+
+This section contains tests borrowed from https://github.com/github/cmark-gfm/blob/master/test/extensions.txt.
+It includes items not found in the official GFM specification, such as footnotes and additional tests for tables,
+task lists, etc.
+
+## Footnotes
+
+```````````````````````````````` example
+This is some text![^1]. Other text.[^footnote].
+
+Here's a thing[^other-note].
+
+And another thing[^codeblock-note].
+
+This doesn't have a referent[^nope].
+
+
+[^other-note]:       no code block here (spaces are stripped away)
+
+[^codeblock-note]:
+        this is now a code block (8 spaces indentation)
+
+[^1]: Some *bolded* footnote definition.
+
+Hi!
+
+[^footnote]:
+    > Blockquotes can be in a footnote.
+
+        as well as code blocks
+
+    or, naturally, simple paragraphs.
+
+[^unused]: This is unused.
+.
+<p>This is some text!<sup class="footnote-ref"><a href="#fn-1" id="fnref-1" data-footnote-ref>1</a></sup>. Other text.<sup class="footnote-ref"><a href="#fn-footnote" id="fnref-footnote" data-footnote-ref>2</a></sup>.</p>
+<p>Here's a thing<sup class="footnote-ref"><a href="#fn-other-note" id="fnref-other-note" data-footnote-ref>3</a></sup>.</p>
+<p>And another thing<sup class="footnote-ref"><a href="#fn-codeblock-note" id="fnref-codeblock-note" data-footnote-ref>4</a></sup>.</p>
+<p>This doesn't have a referent[^nope].</p>
+<p>Hi!</p>
+<section class="footnotes" data-footnotes>
+<ol>
+<li id="fn-1">
+<p>Some <em>bolded</em> footnote definition. <a href="#fnref-1" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1">↩</a></p>
+</li>
+<li id="fn-footnote">
+<blockquote>
+<p>Blockquotes can be in a footnote.</p>
+</blockquote>
+<pre><code>as well as code blocks
+</code></pre>
+<p>or, naturally, simple paragraphs. <a href="#fnref-footnote" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="2" aria-label="Back to reference 2">↩</a></p>
+</li>
+<li id="fn-other-note">
+<p>no code block here (spaces are stripped away) <a href="#fnref-other-note" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="3" aria-label="Back to reference 3">↩</a></p>
+</li>
+<li id="fn-codeblock-note">
+<pre><code>this is now a code block (8 spaces indentation)
+</code></pre>
+<a href="#fnref-codeblock-note" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="4" aria-label="Back to reference 4">↩</a>
+</li>
+</ol>
+</section>
+````````````````````````````````
+
+## When a footnote is used multiple times, we insert multiple backrefs.
+
+```````````````````````````````` example
+This is some text. It has a footnote[^a-footnote].
+
+This footnote is referenced[^a-footnote] multiple times, in lots of different places.[^a-footnote]
+
+[^a-footnote]: This footnote definition should have three backrefs.
+.
+<p>This is some text. It has a footnote<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote" data-footnote-ref>1</a></sup>.</p>
+<p>This footnote is referenced<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote-2" data-footnote-ref>1</a></sup> multiple times, in lots of different places.<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote-3" data-footnote-ref>1</a></sup></p>
+<section class="footnotes" data-footnotes>
+<ol>
+<li id="fn-a-footnote">
+<p>This footnote definition should have three backrefs. <a href="#fnref-a-footnote" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1">↩</a> <a href="#fnref-a-footnote-2" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1-2" aria-label="Back to reference 1-2">↩<sup class="footnote-ref">2</sup></a> <a href="#fnref-a-footnote-3" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1-3" aria-label="Back to reference 1-3">↩<sup class="footnote-ref">3</sup></a></p>
+</li>
+</ol>
+</section>
+````````````````````````````````
+
+## Footnote reference labels are href escaped
+
+```````````````````````````````` example
+Hello[^"><script>alert(1)</script>]
+
+[^"><script>alert(1)</script>]: pwned
+.
+<p>Hello<sup class="footnote-ref"><a href="#fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" id="fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" data-footnote-ref>1</a></sup></p>
+<section class="footnotes" data-footnotes>
+<ol>
+<li id="fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E">
+<p>pwned <a href="#fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1">↩</a></p>
+</li>
+</ol>
+</section>
+````````````````````````````````
+
+## Interop
+
+Autolink and strikethrough.
+
+```````````````````````````````` example
+~~www.google.com~~
+
+~~http://google.com~~
+.
+<p><del><a href="http://www.google.com">www.google.com</a></del></p>
+<p><del><a href="http://google.com">http://google.com</a></del></p>
+````````````````````````````````
+
+Autolink and tables.
+
+```````````````````````````````` example
+| a | b |
+| --- | --- |
+| https://github.com www.github.com | http://pokemon.com |
+.
+<table>
+<thead>
+<tr>
+<th>a</th>
+<th>b</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><a href="https://github.com">https://github.com</a> <a href="http://www.github.com">www.github.com</a></td>
+<td><a href="http://pokemon.com">http://pokemon.com</a></td>
+</tr>
+</tbody>
+</table>
+````````````````````````````````
+
+## Task lists
+
+```````````````````````````````` example
+- [ ] foo
+- [x] bar
+.
+<ul>
+<li><input type="checkbox" disabled="" /> foo</li>
+<li><input type="checkbox" checked="" disabled="" /> bar</li>
+</ul>
+````````````````````````````````
+
+Show that a task list and a regular list get processed the same in
+the way that sublists are created. If something works in a list
+item, then it should work the same way with a task.  The only
+difference should be the tasklist marker. So, if we use something
+other than a space or x, it won't be recognized as a task item, and
+so will be treated as a regular item.
+
+```````````````````````````````` example
+- [x] foo
+  - [ ] bar
+  - [x] baz
+- [ ] bim
+
+Show a regular (non task) list to show that it has the same structure
+- [@] foo
+  - [@] bar
+  - [@] baz
+- [@] bim
+.
+<ul>
+<li><input type="checkbox" checked="" disabled="" /> foo
+<ul>
+<li><input type="checkbox" disabled="" /> bar</li>
+<li><input type="checkbox" checked="" disabled="" /> baz</li>
+</ul>
+</li>
+<li><input type="checkbox" disabled="" /> bim</li>
+</ul>
+<p>Show a regular (non task) list to show that it has the same structure</p>
+<ul>
+<li>[@] foo
+<ul>
+<li>[@] bar</li>
+<li>[@] baz</li>
+</ul>
+</li>
+<li>[@] bim</li>
+</ul>
+````````````````````````````````
+Use a larger indent -- a task list and a regular list should produce
+the same structure.
+
+```````````````````````````````` example
+- [x] foo
+    - [ ] bar
+    - [x] baz
+- [ ] bim
+
+Show a regular (non task) list to show that it has the same structure
+- [@] foo
+    - [@] bar
+    - [@] baz
+- [@] bim
+.
+<ul>
+<li><input type="checkbox" checked="" disabled="" /> foo
+<ul>
+<li><input type="checkbox" disabled="" /> bar</li>
+<li><input type="checkbox" checked="" disabled="" /> baz</li>
+</ul>
+</li>
+<li><input type="checkbox" disabled="" /> bim</li>
+</ul>
+<p>Show a regular (non task) list to show that it has the same structure</p>
+<ul>
+<li>[@] foo
+<ul>
+<li>[@] bar</li>
+<li>[@] baz</li>
+</ul>
+</li>
+<li>[@] bim</li>
+</ul>
+````````````````````````````````
+
+<!-- end of the "GFM undocumented extensions and more robust test" section -->
+
 <!-- END TESTS -->
diff --git a/glfm_specification/output_example_snapshots/examples_index.yml b/glfm_specification/output_example_snapshots/examples_index.yml
index da9420ffa8559..f55ad43eb4881 100644
--- a/glfm_specification/output_example_snapshots/examples_index.yml
+++ b/glfm_specification/output_example_snapshots/examples_index.yml
@@ -2255,3 +2255,27 @@
 08_06_00__gitlab_internal_extension_markdown__footnotes__001:
   spec_example_position: 754
   source_specification: gitlab
+09_00_00__gfm_undocumented_extensions_and_more_robust_test__footnotes__002:
+  spec_example_position: 755
+  source_specification: commonmark
+? 09_01_00__gfm_undocumented_extensions_and_more_robust_test__when_a_footnote_is_used_multiple_times,_we_insert_multiple_backrefs.__001
+: spec_example_position: 756
+  source_specification: commonmark
+09_02_00__gfm_undocumented_extensions_and_more_robust_test__footnote_reference_labels_are_href_escaped__001:
+  spec_example_position: 757
+  source_specification: commonmark
+09_03_00__gfm_undocumented_extensions_and_more_robust_test__interop__001:
+  spec_example_position: 758
+  source_specification: commonmark
+09_03_00__gfm_undocumented_extensions_and_more_robust_test__interop__002:
+  spec_example_position: 759
+  source_specification: commonmark
+09_04_00__gfm_undocumented_extensions_and_more_robust_test__task_lists__001:
+  spec_example_position: 760
+  source_specification: commonmark
+09_04_00__gfm_undocumented_extensions_and_more_robust_test__task_lists__002:
+  spec_example_position: 761
+  source_specification: commonmark
+09_04_00__gfm_undocumented_extensions_and_more_robust_test__task_lists__003:
+  spec_example_position: 762
+  source_specification: commonmark
diff --git a/glfm_specification/output_example_snapshots/html.yml b/glfm_specification/output_example_snapshots/html.yml
index a301ab48fc002..ab98ee36a1d2e 100644
--- a/glfm_specification/output_example_snapshots/html.yml
+++ b/glfm_specification/output_example_snapshots/html.yml
@@ -8650,3 +8650,278 @@
   wysiwyg: |-
     <p dir="auto">footnote reference tag <sup dir="auto" identifier="fortytwo">fortytwo</sup></p>
     <div node="footnoteDefinition(paragraph(&quot;footnote text&quot;))" htmlattributes="[object Object]"><p dir="auto">footnote text</p></div>
+09_00_00__gfm_undocumented_extensions_and_more_robust_test__footnotes__002:
+  canonical: |
+    <p>This is some text!<sup class="footnote-ref"><a href="#fn-1" id="fnref-1" data-footnote-ref>1</a></sup>. Other text.<sup class="footnote-ref"><a href="#fn-footnote" id="fnref-footnote" data-footnote-ref>2</a></sup>.</p>
+    <p>Here's a thing<sup class="footnote-ref"><a href="#fn-other-note" id="fnref-other-note" data-footnote-ref>3</a></sup>.</p>
+    <p>And another thing<sup class="footnote-ref"><a href="#fn-codeblock-note" id="fnref-codeblock-note" data-footnote-ref>4</a></sup>.</p>
+    <p>This doesn't have a referent[^nope].</p>
+    <p>Hi!</p>
+    <section class="footnotes" data-footnotes>
+    <ol>
+    <li id="fn-1">
+    <p>Some <em>bolded</em> footnote definition. <a href="#fnref-1" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1">↩</a></p>
+    </li>
+    <li id="fn-footnote">
+    <blockquote>
+    <p>Blockquotes can be in a footnote.</p>
+    </blockquote>
+    <pre><code>as well as code blocks
+    </code></pre>
+    <p>or, naturally, simple paragraphs. <a href="#fnref-footnote" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="2" aria-label="Back to reference 2">↩</a></p>
+    </li>
+    <li id="fn-other-note">
+    <p>no code block here (spaces are stripped away) <a href="#fnref-other-note" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="3" aria-label="Back to reference 3">↩</a></p>
+    </li>
+    <li id="fn-codeblock-note">
+    <pre><code>this is now a code block (8 spaces indentation)
+    </code></pre>
+    <a href="#fnref-codeblock-note" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="4" aria-label="Back to reference 4">↩</a>
+    </li>
+    </ol>
+    </section>
+  static: |-
+    <p data-sourcepos="1:1-1:47" dir="auto">This is some text!<sup class="footnote-ref"><a href="#fn-1-42" id="fnref-1-42" data-footnote-ref>1</a></sup>. Other text.<sup class="footnote-ref"><a href="#fn-footnote-42" id="fnref-footnote-42" data-footnote-ref>2</a></sup>.</p>
+    <p data-sourcepos="3:1-3:28" dir="auto">Here's a thing<sup class="footnote-ref"><a href="#fn-other-note-42" id="fnref-other-note-42" data-footnote-ref>3</a></sup>.</p>
+    <p data-sourcepos="5:1-5:35" dir="auto">And another thing<sup class="footnote-ref"><a href="#fn-codeblock-note-42" id="fnref-codeblock-note-42" data-footnote-ref>4</a></sup>.</p>
+    <p data-sourcepos="7:1-7:36" dir="auto">This doesn't have a referent[^nope].</p>
+    <p data-sourcepos="17:1-17:3" dir="auto">Hi!</p>
+    <section data-footnotes class="footnotes">
+    <ol>
+    <li id="fn-1-42">
+    <p data-sourcepos="15:7-15:40">Some <em>bolded</em> footnote definition. <a href="#fnref-1-42" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1" class="footnote-backref"><gl-emoji title="leftwards arrow with hook" data-name="leftwards_arrow_with_hook" data-unicode-version="1.1">↩</gl-emoji></a></p>
+    </li>
+    <li id="fn-footnote-42">
+    <blockquote data-sourcepos="20:5-20:39">
+    <p data-sourcepos="20:7-20:39">Blockquotes can be in a footnote.</p>
+    </blockquote>
+    <div class="gl-relative markdown-code-block js-markdown-code">
+    <pre data-sourcepos="22:9-23:0" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">as well as code blocks</span></code></pre>
+    <copy-code></copy-code>
+    </div>
+    <p data-sourcepos="24:5-24:37">or, naturally, simple paragraphs. <a href="#fnref-footnote-42" data-footnote-backref data-footnote-backref-idx="2" aria-label="Back to reference 2" class="footnote-backref"><gl-emoji title="leftwards arrow with hook" data-name="leftwards_arrow_with_hook" data-unicode-version="1.1">↩</gl-emoji></a></p>
+    </li>
+    <li id="fn-other-note-42">
+    <p data-sourcepos="10:22-10:66">no code block here (spaces are stripped away) <a href="#fnref-other-note-42" data-footnote-backref data-footnote-backref-idx="3" aria-label="Back to reference 3" class="footnote-backref"><gl-emoji title="leftwards arrow with hook" data-name="leftwards_arrow_with_hook" data-unicode-version="1.1">↩</gl-emoji></a></p>
+    </li>
+    <li id="fn-codeblock-note-42">
+    <div class="gl-relative markdown-code-block js-markdown-code">
+    <pre data-sourcepos="13:9-14:0" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">this is now a code block (8 spaces indentation)</span></code></pre>
+    <copy-code></copy-code>
+    </div>
+    <a href="#fnref-codeblock-note-42" data-footnote-backref data-footnote-backref-idx="4" aria-label="Back to reference 4" class="footnote-backref"><gl-emoji title="leftwards arrow with hook" data-name="leftwards_arrow_with_hook" data-unicode-version="1.1">↩</gl-emoji></a>
+    </li>
+    </ol>
+    </section>
+  wysiwyg: |-
+    <p dir="auto">This is some text!<sup dir="auto" identifier="1">1</sup>. Other text.<sup dir="auto" identifier="footnote">footnote</sup>.</p>
+    <p dir="auto">Here's a thing<sup dir="auto" identifier="other-note">other-note</sup>.</p>
+    <p dir="auto">And another thing<sup dir="auto" identifier="codeblock-note">codeblock-note</sup>.</p>
+    <p dir="auto">This doesn't have a referent[^nope].</p>
+    <div node="footnoteDefinition(paragraph(&quot;no code block here (spaces are stripped away)&quot;))" htmlattributes="[object Object]"><p dir="auto">no code block here (spaces are stripped away)</p></div>
+    <div node="footnoteDefinition(paragraph(&quot;Some &quot;, italic(&quot;bolded&quot;), &quot; footnote definition.&quot;))" htmlattributes="[object Object]"><p dir="auto">Some <em>bolded</em> footnote definition.</p></div>
+    <p dir="auto">Hi!</p>
+    <div node="footnoteDefinition(paragraph(&quot;This is unused.&quot;))" htmlattributes="[object Object]"><p dir="auto">This is unused.</p></div>
+? 09_01_00__gfm_undocumented_extensions_and_more_robust_test__when_a_footnote_is_used_multiple_times,_we_insert_multiple_backrefs.__001
+: canonical: |
+    <p>This is some text. It has a footnote<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote" data-footnote-ref>1</a></sup>.</p>
+    <p>This footnote is referenced<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote-2" data-footnote-ref>1</a></sup> multiple times, in lots of different places.<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote-3" data-footnote-ref>1</a></sup></p>
+    <section class="footnotes" data-footnotes>
+    <ol>
+    <li id="fn-a-footnote">
+    <p>This footnote definition should have three backrefs. <a href="#fnref-a-footnote" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1">↩</a> <a href="#fnref-a-footnote-2" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1-2" aria-label="Back to reference 1-2">↩<sup class="footnote-ref">2</sup></a> <a href="#fnref-a-footnote-3" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1-3" aria-label="Back to reference 1-3">↩<sup class="footnote-ref">3</sup></a></p>
+    </li>
+    </ol>
+    </section>
+  static: |-
+    <p data-sourcepos="1:1-1:50" dir="auto">This is some text. It has a footnote<sup class="footnote-ref"><a href="#fn-a-footnote-42" id="fnref-a-footnote-42" data-footnote-ref>1</a></sup>.</p>
+    <p data-sourcepos="3:1-3:98" dir="auto">This footnote is referenced<sup><a href="#fn-a-footnote" id="fnref-a-footnote-2" data-footnote-ref>1</a></sup> multiple times, in lots of different places.<sup><a href="#fn-a-footnote" id="fnref-a-footnote-3" data-footnote-ref>1</a></sup></p>
+    <section data-footnotes class="footnotes">
+    <ol>
+    <li id="fn-a-footnote-42">
+    <p data-sourcepos="5:16-5:67">This footnote definition should have three backrefs. <a href="#fnref-a-footnote-42" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1" class="footnote-backref"><gl-emoji title="leftwards arrow with hook" data-name="leftwards_arrow_with_hook" data-unicode-version="1.1">↩</gl-emoji></a> <a href="#fnref-a-footnote-2" data-footnote-backref data-footnote-backref-idx="1-2" aria-label="Back to reference 1-2"><gl-emoji title="leftwards arrow with hook" data-name="leftwards_arrow_with_hook" data-unicode-version="1.1">↩</gl-emoji><sup>2</sup></a> <a href="#fnref-a-footnote-3" data-footnote-backref data-footnote-backref-idx="1-3" aria-label="Back to reference 1-3"><gl-emoji title="leftwards arrow with hook" data-name="leftwards_arrow_with_hook" data-unicode-version="1.1">↩</gl-emoji><sup>3</sup></a></p>
+    </li>
+    </ol>
+    </section>
+  wysiwyg: |-
+    <p dir="auto">This is some text. It has a footnote<sup dir="auto" identifier="a-footnote">a-footnote</sup>.</p>
+    <p dir="auto">This footnote is referenced<sup dir="auto" identifier="a-footnote">a-footnote</sup> multiple times, in lots of different places.<sup dir="auto" identifier="a-footnote">a-footnote</sup></p>
+    <div node="footnoteDefinition(paragraph(&quot;This footnote definition should have three backrefs.&quot;))" htmlattributes="[object Object]"><p dir="auto">This footnote definition should have three backrefs.</p></div>
+09_02_00__gfm_undocumented_extensions_and_more_robust_test__footnote_reference_labels_are_href_escaped__001:
+  canonical: |
+    <p>Hello<sup class="footnote-ref"><a href="#fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" id="fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" data-footnote-ref>1</a></sup></p>
+    <section class="footnotes" data-footnotes>
+    <ol>
+    <li id="fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E">
+    <p>pwned <a href="#fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1">↩</a></p>
+    </li>
+    </ol>
+    </section>
+  static: |-
+    <p data-sourcepos="1:1-1:35" dir="auto">Hello<sup class="footnote-ref"><a href="#fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E-42" id="fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E-42" data-footnote-ref>1</a></sup></p>
+    <section data-footnotes class="footnotes">
+    <ol>
+    <li id="fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E-42">
+    <p data-sourcepos="3:33-3:37">pwned <a href="#fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E-42" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1" class="footnote-backref"><gl-emoji title="leftwards arrow with hook" data-name="leftwards_arrow_with_hook" data-unicode-version="1.1">↩</gl-emoji></a></p>
+    </li>
+    </ol>
+    </section>
+  wysiwyg: |-
+    <p dir="auto">Hello<sup dir="auto" identifier="&quot;><script>alert(1)</script>">"&gt;&lt;script&gt;alert(1)&lt;/script&gt;</sup></p>
+    <div node="footnoteDefinition(paragraph(&quot;pwned&quot;))" htmlattributes="[object Object]"><p dir="auto">pwned</p></div>
+09_03_00__gfm_undocumented_extensions_and_more_robust_test__interop__001:
+  canonical: |
+    <p><del><a href="http://www.google.com">www.google.com</a></del></p>
+    <p><del><a href="http://google.com">http://google.com</a></del></p>
+  static: |-
+    <p data-sourcepos="1:1-1:18" dir="auto"><del><a href="http://www.google.com" rel="nofollow noreferrer noopener" target="_blank">www.google.com</a></del></p>
+    <p data-sourcepos="3:1-3:21" dir="auto"><del><a href="http://google.com" rel="nofollow noreferrer noopener" target="_blank">http://google.com</a></del></p>
+  wysiwyg: |-
+    <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="http://www.google.com"><s>www.google.com</s></a></p>
+    <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="http://google.com"><s>http://google.com</s></a></p>
+09_03_00__gfm_undocumented_extensions_and_more_robust_test__interop__002:
+  canonical: |
+    <table>
+    <thead>
+    <tr>
+    <th>a</th>
+    <th>b</th>
+    </tr>
+    </thead>
+    <tbody>
+    <tr>
+    <td><a href="https://github.com">https://github.com</a> <a href="http://www.github.com">www.github.com</a></td>
+    <td><a href="http://pokemon.com">http://pokemon.com</a></td>
+    </tr>
+    </tbody>
+    </table>
+  static: |-
+    <table data-sourcepos="1:1-3:58" dir="auto">
+    <thead>
+    <tr data-sourcepos="1:1-1:9">
+    <th data-sourcepos="1:2-1:4">a</th>
+    <th data-sourcepos="1:6-1:8">b</th>
+    </tr>
+    </thead>
+    <tbody>
+    <tr data-sourcepos="3:1-3:58">
+    <td data-sourcepos="3:2-3:36">
+    <a href="https://github.com" rel="nofollow noreferrer noopener" target="_blank">https://github.com</a> <a href="http://www.github.com" rel="nofollow noreferrer noopener" target="_blank">www.github.com</a>
+    </td>
+    <td data-sourcepos="3:38-3:57"><a href="http://pokemon.com" rel="nofollow noreferrer noopener" target="_blank">http://pokemon.com</a></td>
+    </tr>
+    </tbody>
+    </table>
+  wysiwyg: |-
+    <table><tbody><tr><th colspan="1" rowspan="1"><p dir="auto">a</p></th><th colspan="1" rowspan="1"><p dir="auto">b</p></th></tr><tr><td colspan="1" rowspan="1"><p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://github.com">https://github.com</a><a target="_blank" rel="noopener noreferrer nofollow" href="http://www.github.com">www.github.com</a></p></td><td colspan="1" rowspan="1"><p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="http://pokemon.com">http://pokemon.com</a></p></td></tr></tbody></table>
+09_04_00__gfm_undocumented_extensions_and_more_robust_test__task_lists__001:
+  canonical: |
+    <ul>
+    <li><input type="checkbox" disabled="" /> foo</li>
+    <li><input type="checkbox" checked="" disabled="" /> bar</li>
+    </ul>
+  static: |-
+    <ul data-sourcepos="1:1-2:9" class="task-list" dir="auto">
+    <li data-sourcepos="1:1-1:9" class="task-list-item">
+    <task-button></task-button><input type="checkbox" class="task-list-item-checkbox" disabled> foo</li>
+    <li data-sourcepos="2:1-2:9" class="task-list-item">
+    <task-button></task-button><input type="checkbox" class="task-list-item-checkbox" checked disabled> bar</li>
+    </ul>
+  wysiwyg: |-
+    <ul dir="auto" start="1" parens="false" data-type="taskList"><li dir="auto" data-checked="false" data-type="taskItem"><label><input type="checkbox"><span></span></label><div><p dir="auto">foo</p></div></li><li dir="auto" data-checked="true" data-type="taskItem"><label><input type="checkbox" checked="checked"><span></span></label><div><p dir="auto">bar</p></div></li></ul>
+09_04_00__gfm_undocumented_extensions_and_more_robust_test__task_lists__002:
+  canonical: |
+    <ul>
+    <li><input type="checkbox" checked="" disabled="" /> foo
+    <ul>
+    <li><input type="checkbox" disabled="" /> bar</li>
+    <li><input type="checkbox" checked="" disabled="" /> baz</li>
+    </ul>
+    </li>
+    <li><input type="checkbox" disabled="" /> bim</li>
+    </ul>
+    <p>Show a regular (non task) list to show that it has the same structure</p>
+    <ul>
+    <li>[@] foo
+    <ul>
+    <li>[@] bar</li>
+    <li>[@] baz</li>
+    </ul>
+    </li>
+    <li>[@] bim</li>
+    </ul>
+  static: |-
+    <ul data-sourcepos="1:1-5:0" class="task-list" dir="auto">
+    <li data-sourcepos="1:1-3:11" class="task-list-item">
+    <task-button></task-button><input type="checkbox" class="task-list-item-checkbox" checked disabled> foo
+    <ul data-sourcepos="2:3-3:11" class="task-list">
+    <li data-sourcepos="2:3-2:11" class="task-list-item">
+    <task-button></task-button><input type="checkbox" class="task-list-item-checkbox" disabled> bar</li>
+    <li data-sourcepos="3:3-3:11" class="task-list-item">
+    <task-button></task-button><input type="checkbox" class="task-list-item-checkbox" checked disabled> baz</li>
+    </ul>
+    </li>
+    <li data-sourcepos="4:1-5:0" class="task-list-item">
+    <task-button></task-button><input type="checkbox" class="task-list-item-checkbox" disabled> bim</li>
+    </ul>
+    <p data-sourcepos="6:1-6:69" dir="auto">Show a regular (non task) list to show that it has the same structure</p>
+    <ul data-sourcepos="7:1-10:9" dir="auto">
+    <li data-sourcepos="7:1-9:11">[@] foo
+    <ul data-sourcepos="8:3-9:11">
+    <li data-sourcepos="8:3-8:11">[@] bar</li>
+    <li data-sourcepos="9:3-9:11">[@] baz</li>
+    </ul>
+    </li>
+    <li data-sourcepos="10:1-10:9">[@] bim</li>
+    </ul>
+  wysiwyg: |-
+    Error - check implementation:
+    Cannot read properties of undefined (reading 'start')
+09_04_00__gfm_undocumented_extensions_and_more_robust_test__task_lists__003:
+  canonical: |
+    <ul>
+    <li><input type="checkbox" checked="" disabled="" /> foo
+    <ul>
+    <li><input type="checkbox" disabled="" /> bar</li>
+    <li><input type="checkbox" checked="" disabled="" /> baz</li>
+    </ul>
+    </li>
+    <li><input type="checkbox" disabled="" /> bim</li>
+    </ul>
+    <p>Show a regular (non task) list to show that it has the same structure</p>
+    <ul>
+    <li>[@] foo
+    <ul>
+    <li>[@] bar</li>
+    <li>[@] baz</li>
+    </ul>
+    </li>
+    <li>[@] bim</li>
+    </ul>
+  static: |-
+    <ul data-sourcepos="1:1-5:0" class="task-list" dir="auto">
+    <li data-sourcepos="1:1-3:13" class="task-list-item">
+    <task-button></task-button><input type="checkbox" class="task-list-item-checkbox" checked disabled> foo
+    <ul data-sourcepos="2:5-3:13" class="task-list">
+    <li data-sourcepos="2:5-2:13" class="task-list-item">
+    <task-button></task-button><input type="checkbox" class="task-list-item-checkbox" disabled> bar</li>
+    <li data-sourcepos="3:5-3:13" class="task-list-item">
+    <task-button></task-button><input type="checkbox" class="task-list-item-checkbox" checked disabled> baz</li>
+    </ul>
+    </li>
+    <li data-sourcepos="4:1-5:0" class="task-list-item">
+    <task-button></task-button><input type="checkbox" class="task-list-item-checkbox" disabled> bim</li>
+    </ul>
+    <p data-sourcepos="6:1-6:69" dir="auto">Show a regular (non task) list to show that it has the same structure</p>
+    <ul data-sourcepos="7:1-10:9" dir="auto">
+    <li data-sourcepos="7:1-9:13">[@] foo
+    <ul data-sourcepos="8:5-9:13">
+    <li data-sourcepos="8:5-8:13">[@] bar</li>
+    <li data-sourcepos="9:5-9:13">[@] baz</li>
+    </ul>
+    </li>
+    <li data-sourcepos="10:1-10:9">[@] bim</li>
+    </ul>
+  wysiwyg: |-
+    Error - check implementation:
+    Cannot read properties of undefined (reading 'start')
diff --git a/glfm_specification/output_example_snapshots/markdown.yml b/glfm_specification/output_example_snapshots/markdown.yml
index bb41e676002c2..926df94e0f477 100644
--- a/glfm_specification/output_example_snapshots/markdown.yml
+++ b/glfm_specification/output_example_snapshots/markdown.yml
@@ -2557,3 +2557,74 @@
   footnote reference tag [^fortytwo]
 
   [^fortytwo]: footnote text
+09_00_00__gfm_undocumented_extensions_and_more_robust_test__footnotes__002: |
+  This is some text![^1]. Other text.[^footnote].
+
+  Here's a thing[^other-note].
+
+  And another thing[^codeblock-note].
+
+  This doesn't have a referent[^nope].
+
+
+  [^other-note]:       no code block here (spaces are stripped away)
+
+  [^codeblock-note]:
+          this is now a code block (8 spaces indentation)
+
+  [^1]: Some *bolded* footnote definition.
+
+  Hi!
+
+  [^footnote]:
+      > Blockquotes can be in a footnote.
+
+          as well as code blocks
+
+      or, naturally, simple paragraphs.
+
+  [^unused]: This is unused.
+? 09_01_00__gfm_undocumented_extensions_and_more_robust_test__when_a_footnote_is_used_multiple_times,_we_insert_multiple_backrefs.__001
+: |
+  This is some text. It has a footnote[^a-footnote].
+
+  This footnote is referenced[^a-footnote] multiple times, in lots of different places.[^a-footnote]
+
+  [^a-footnote]: This footnote definition should have three backrefs.
+09_02_00__gfm_undocumented_extensions_and_more_robust_test__footnote_reference_labels_are_href_escaped__001: |
+  Hello[^"><script>alert(1)</script>]
+
+  [^"><script>alert(1)</script>]: pwned
+09_03_00__gfm_undocumented_extensions_and_more_robust_test__interop__001: |
+  ~~www.google.com~~
+
+  ~~http://google.com~~
+09_03_00__gfm_undocumented_extensions_and_more_robust_test__interop__002: |
+  | a | b |
+  | --- | --- |
+  | https://github.com www.github.com | http://pokemon.com |
+09_04_00__gfm_undocumented_extensions_and_more_robust_test__task_lists__001: |
+  - [ ] foo
+  - [x] bar
+09_04_00__gfm_undocumented_extensions_and_more_robust_test__task_lists__002: |
+  - [x] foo
+    - [ ] bar
+    - [x] baz
+  - [ ] bim
+
+  Show a regular (non task) list to show that it has the same structure
+  - [@] foo
+    - [@] bar
+    - [@] baz
+  - [@] bim
+09_04_00__gfm_undocumented_extensions_and_more_robust_test__task_lists__003: |
+  - [x] foo
+      - [ ] bar
+      - [x] baz
+  - [ ] bim
+
+  Show a regular (non task) list to show that it has the same structure
+  - [@] foo
+      - [@] bar
+      - [@] baz
+  - [@] bim
diff --git a/glfm_specification/output_example_snapshots/prosemirror_json.yml b/glfm_specification/output_example_snapshots/prosemirror_json.yml
index bc6293b54b228..00c805b6928c4 100644
--- a/glfm_specification/output_example_snapshots/prosemirror_json.yml
+++ b/glfm_specification/output_example_snapshots/prosemirror_json.yml
@@ -23425,3 +23425,527 @@
       }
     ]
   }
+09_00_00__gfm_undocumented_extensions_and_more_robust_test__footnotes__002: |-
+  {
+    "type": "doc",
+    "content": [
+      {
+        "type": "paragraph",
+        "content": [
+          {
+            "type": "text",
+            "text": "This is some text!"
+          },
+          {
+            "type": "footnoteReference",
+            "attrs": {
+              "identifier": "1",
+              "label": "1"
+            }
+          },
+          {
+            "type": "text",
+            "text": ". Other text."
+          },
+          {
+            "type": "footnoteReference",
+            "attrs": {
+              "identifier": "footnote",
+              "label": "footnote"
+            }
+          },
+          {
+            "type": "text",
+            "text": "."
+          }
+        ]
+      },
+      {
+        "type": "paragraph",
+        "content": [
+          {
+            "type": "text",
+            "text": "Here's a thing"
+          },
+          {
+            "type": "footnoteReference",
+            "attrs": {
+              "identifier": "other-note",
+              "label": "other-note"
+            }
+          },
+          {
+            "type": "text",
+            "text": "."
+          }
+        ]
+      },
+      {
+        "type": "paragraph",
+        "content": [
+          {
+            "type": "text",
+            "text": "And another thing"
+          },
+          {
+            "type": "footnoteReference",
+            "attrs": {
+              "identifier": "codeblock-note",
+              "label": "codeblock-note"
+            }
+          },
+          {
+            "type": "text",
+            "text": "."
+          }
+        ]
+      },
+      {
+        "type": "paragraph",
+        "content": [
+          {
+            "type": "text",
+            "text": "This doesn't have a referent[^nope]."
+          }
+        ]
+      },
+      {
+        "type": "footnoteDefinition",
+        "attrs": {
+          "identifier": "other-note",
+          "label": "other-note"
+        },
+        "content": [
+          {
+            "type": "paragraph",
+            "content": [
+              {
+                "type": "text",
+                "text": "no code block here (spaces are stripped away)"
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "type": "footnoteDefinition",
+        "attrs": {
+          "identifier": "1",
+          "label": "1"
+        },
+        "content": [
+          {
+            "type": "paragraph",
+            "content": [
+              {
+                "type": "text",
+                "text": "Some "
+              },
+              {
+                "type": "text",
+                "marks": [
+                  {
+                    "type": "italic"
+                  }
+                ],
+                "text": "bolded"
+              },
+              {
+                "type": "text",
+                "text": " footnote definition."
+              }
+            ]
+          }
+        ]
+      },
+      {
+        "type": "paragraph",
+        "content": [
+          {
+            "type": "text",
+            "text": "Hi!"
+          }
+        ]
+      },
+      {
+        "type": "footnoteDefinition",
+        "attrs": {
+          "identifier": "unused",
+          "label": "unused"
+        },
+        "content": [
+          {
+            "type": "paragraph",
+            "content": [
+              {
+                "type": "text",
+                "text": "This is unused."
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+? 09_01_00__gfm_undocumented_extensions_and_more_robust_test__when_a_footnote_is_used_multiple_times,_we_insert_multiple_backrefs.__001
+: |-
+  {
+    "type": "doc",
+    "content": [
+      {
+        "type": "paragraph",
+        "content": [
+          {
+            "type": "text",
+            "text": "This is some text. It has a footnote"
+          },
+          {
+            "type": "footnoteReference",
+            "attrs": {
+              "identifier": "a-footnote",
+              "label": "a-footnote"
+            }
+          },
+          {
+            "type": "text",
+            "text": "."
+          }
+        ]
+      },
+      {
+        "type": "paragraph",
+        "content": [
+          {
+            "type": "text",
+            "text": "This footnote is referenced"
+          },
+          {
+            "type": "footnoteReference",
+            "attrs": {
+              "identifier": "a-footnote",
+              "label": "a-footnote"
+            }
+          },
+          {
+            "type": "text",
+            "text": " multiple times, in lots of different places."
+          },
+          {
+            "type": "footnoteReference",
+            "attrs": {
+              "identifier": "a-footnote",
+              "label": "a-footnote"
+            }
+          }
+        ]
+      },
+      {
+        "type": "footnoteDefinition",
+        "attrs": {
+          "identifier": "a-footnote",
+          "label": "a-footnote"
+        },
+        "content": [
+          {
+            "type": "paragraph",
+            "content": [
+              {
+                "type": "text",
+                "text": "This footnote definition should have three backrefs."
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+09_02_00__gfm_undocumented_extensions_and_more_robust_test__footnote_reference_labels_are_href_escaped__001: |-
+  {
+    "type": "doc",
+    "content": [
+      {
+        "type": "paragraph",
+        "content": [
+          {
+            "type": "text",
+            "text": "Hello"
+          },
+          {
+            "type": "footnoteReference",
+            "attrs": {
+              "identifier": "\"><script>alert(1)</script>",
+              "label": "\"><script>alert(1)</script>"
+            }
+          }
+        ]
+      },
+      {
+        "type": "footnoteDefinition",
+        "attrs": {
+          "identifier": "\"><script>alert(1)</script>",
+          "label": "\"><script>alert(1)</script>"
+        },
+        "content": [
+          {
+            "type": "paragraph",
+            "content": [
+              {
+                "type": "text",
+                "text": "pwned"
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+09_03_00__gfm_undocumented_extensions_and_more_robust_test__interop__001: |-
+  {
+    "type": "doc",
+    "content": [
+      {
+        "type": "paragraph",
+        "content": [
+          {
+            "type": "text",
+            "marks": [
+              {
+                "type": "link",
+                "attrs": {
+                  "uploading": false,
+                  "href": "http://www.google.com",
+                  "title": null,
+                  "canonicalSrc": "http://www.google.com",
+                  "isReference": false
+                }
+              },
+              {
+                "type": "strike"
+              }
+            ],
+            "text": "www.google.com"
+          }
+        ]
+      },
+      {
+        "type": "paragraph",
+        "content": [
+          {
+            "type": "text",
+            "marks": [
+              {
+                "type": "link",
+                "attrs": {
+                  "uploading": false,
+                  "href": "http://google.com",
+                  "title": null,
+                  "canonicalSrc": "http://google.com",
+                  "isReference": false
+                }
+              },
+              {
+                "type": "strike"
+              }
+            ],
+            "text": "http://google.com"
+          }
+        ]
+      }
+    ]
+  }
+09_03_00__gfm_undocumented_extensions_and_more_robust_test__interop__002: |-
+  {
+    "type": "doc",
+    "content": [
+      {
+        "type": "table",
+        "attrs": {
+          "isMarkdown": null
+        },
+        "content": [
+          {
+            "type": "tableRow",
+            "content": [
+              {
+                "type": "tableHeader",
+                "attrs": {
+                  "colspan": 1,
+                  "rowspan": 1,
+                  "colwidth": null
+                },
+                "content": [
+                  {
+                    "type": "paragraph",
+                    "content": [
+                      {
+                        "type": "text",
+                        "text": "a"
+                      }
+                    ]
+                  }
+                ]
+              },
+              {
+                "type": "tableHeader",
+                "attrs": {
+                  "colspan": 1,
+                  "rowspan": 1,
+                  "colwidth": null
+                },
+                "content": [
+                  {
+                    "type": "paragraph",
+                    "content": [
+                      {
+                        "type": "text",
+                        "text": "b"
+                      }
+                    ]
+                  }
+                ]
+              }
+            ]
+          },
+          {
+            "type": "tableRow",
+            "content": [
+              {
+                "type": "tableCell",
+                "attrs": {
+                  "colspan": 1,
+                  "rowspan": 1,
+                  "colwidth": null
+                },
+                "content": [
+                  {
+                    "type": "paragraph",
+                    "content": [
+                      {
+                        "type": "text",
+                        "marks": [
+                          {
+                            "type": "link",
+                            "attrs": {
+                              "uploading": false,
+                              "href": "https://github.com",
+                              "title": null,
+                              "canonicalSrc": "https://github.com",
+                              "isReference": false
+                            }
+                          }
+                        ],
+                        "text": "https://github.com"
+                      },
+                      {
+                        "type": "text",
+                        "marks": [
+                          {
+                            "type": "link",
+                            "attrs": {
+                              "uploading": false,
+                              "href": "http://www.github.com",
+                              "title": null,
+                              "canonicalSrc": "http://www.github.com",
+                              "isReference": false
+                            }
+                          }
+                        ],
+                        "text": "www.github.com"
+                      }
+                    ]
+                  }
+                ]
+              },
+              {
+                "type": "tableCell",
+                "attrs": {
+                  "colspan": 1,
+                  "rowspan": 1,
+                  "colwidth": null
+                },
+                "content": [
+                  {
+                    "type": "paragraph",
+                    "content": [
+                      {
+                        "type": "text",
+                        "marks": [
+                          {
+                            "type": "link",
+                            "attrs": {
+                              "uploading": false,
+                              "href": "http://pokemon.com",
+                              "title": null,
+                              "canonicalSrc": "http://pokemon.com",
+                              "isReference": false
+                            }
+                          }
+                        ],
+                        "text": "http://pokemon.com"
+                      }
+                    ]
+                  }
+                ]
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+09_04_00__gfm_undocumented_extensions_and_more_robust_test__task_lists__001: |-
+  {
+    "type": "doc",
+    "content": [
+      {
+        "type": "taskList",
+        "attrs": {
+          "numeric": false,
+          "start": 1,
+          "parens": false
+        },
+        "content": [
+          {
+            "type": "taskItem",
+            "attrs": {
+              "checked": false
+            },
+            "content": [
+              {
+                "type": "paragraph",
+                "content": [
+                  {
+                    "type": "text",
+                    "text": "foo"
+                  }
+                ]
+              }
+            ]
+          },
+          {
+            "type": "taskItem",
+            "attrs": {
+              "checked": true
+            },
+            "content": [
+              {
+                "type": "paragraph",
+                "content": [
+                  {
+                    "type": "text",
+                    "text": "bar"
+                  }
+                ]
+              }
+            ]
+          }
+        ]
+      }
+    ]
+  }
+09_04_00__gfm_undocumented_extensions_and_more_robust_test__task_lists__002: |-
+  Error - check implementation:
+  Cannot read properties of undefined (reading 'start')
+09_04_00__gfm_undocumented_extensions_and_more_robust_test__task_lists__003: |-
+  Error - check implementation:
+  Cannot read properties of undefined (reading 'start')
diff --git a/glfm_specification/output_example_snapshots/snapshot_spec.html b/glfm_specification/output_example_snapshots/snapshot_spec.html
index 1fb5350cbe325..5c38f8ff5f0cd 100644
--- a/glfm_specification/output_example_snapshots/snapshot_spec.html
+++ b/glfm_specification/output_example_snapshots/snapshot_spec.html
@@ -366,6 +366,15 @@
 <li><a href="#footnotes-1">Footnotes</a></li>
 </ul>
 </li>
+<li>
+<a href="#gfm-undocumented-extensions-and-more-robust-test">GFM undocumented extensions and more robust test</a><ul>
+<li><a href="#footnotes-2">Footnotes</a></li>
+<li><a href="#when-a-footnote-is-used-multiple-times-we-insert-multiple-backrefs">When a footnote is used multiple times, we insert multiple backrefs.</a></li>
+<li><a href="#footnote-reference-labels-are-href-escaped">Footnote reference labels are href escaped</a></li>
+<li><a href="#interop">Interop</a></li>
+<li><a href="#task-lists">Task lists</a></li>
+</ul>
+</li>
 </ul>
 <h1 data-sourcepos="3:1-3:15" dir="auto">
 <a id="user-content-preliminaries" class="anchor" href="#preliminaries" aria-hidden="true"></a>Preliminaries</h1>
@@ -13545,6 +13554,269 @@ where it makes sense.</p>
 <copy-code></copy-code>
 </div>
 </div>
+<h1 data-sourcepos="15150:1-15150:50" dir="auto">
+<a id="user-content-gfm-undocumented-extensions-and-more-robust-test" class="anchor" href="#gfm-undocumented-extensions-and-more-robust-test" aria-hidden="true"></a>GFM undocumented extensions and more robust test</h1>
+<p data-sourcepos="15152:1-15154:16" dir="auto">This section contains tests borrowed from <a href="https://github.com/github/cmark-gfm/blob/master/test/extensions.txt" rel="nofollow noreferrer noopener" target="_blank">https://github.com/github/cmark-gfm/blob/master/test/extensions.txt</a>.
+It includes items not found in the official GFM specification, such as footnotes and additional tests for tables,
+task lists, etc.</p>
+<h2 data-sourcepos="15156:1-15156:12" dir="auto">
+<a id="user-content-footnotes-2" class="anchor" href="#footnotes-2" aria-hidden="true"></a>Footnotes</h2>
+<div>
+<div><a href="#example-755">Example 755</a></div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15161:1-15188:32" data-canonical-lang="example" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">This is some text![^1]. Other text.[^footnote].</span>
+<span id="LC2" class="line" lang="plaintext"></span>
+<span id="LC3" class="line" lang="plaintext">Here's a thing[^other-note].</span>
+<span id="LC4" class="line" lang="plaintext"></span>
+<span id="LC5" class="line" lang="plaintext">And another thing[^codeblock-note].</span>
+<span id="LC6" class="line" lang="plaintext"></span>
+<span id="LC7" class="line" lang="plaintext">This doesn't have a referent[^nope].</span>
+<span id="LC8" class="line" lang="plaintext"></span>
+<span id="LC9" class="line" lang="plaintext"></span>
+<span id="LC10" class="line" lang="plaintext">[^other-note]:       no code block here (spaces are stripped away)</span>
+<span id="LC11" class="line" lang="plaintext"></span>
+<span id="LC12" class="line" lang="plaintext">[^codeblock-note]:</span>
+<span id="LC13" class="line" lang="plaintext">        this is now a code block (8 spaces indentation)</span>
+<span id="LC14" class="line" lang="plaintext"></span>
+<span id="LC15" class="line" lang="plaintext">[^1]: Some *bolded* footnote definition.</span>
+<span id="LC16" class="line" lang="plaintext"></span>
+<span id="LC17" class="line" lang="plaintext">Hi!</span>
+<span id="LC18" class="line" lang="plaintext"></span>
+<span id="LC19" class="line" lang="plaintext">[^footnote]:</span>
+<span id="LC20" class="line" lang="plaintext">    &gt; Blockquotes can be in a footnote.</span>
+<span id="LC21" class="line" lang="plaintext"></span>
+<span id="LC22" class="line" lang="plaintext">        as well as code blocks</span>
+<span id="LC23" class="line" lang="plaintext"></span>
+<span id="LC24" class="line" lang="plaintext">    or, naturally, simple paragraphs.</span>
+<span id="LC25" class="line" lang="plaintext"></span>
+<span id="LC26" class="line" lang="plaintext">[^unused]: This is unused.</span></code></pre>
+<copy-code></copy-code>
+</div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15190:1-15219:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">&lt;p&gt;This is some text!&lt;sup class="footnote-ref"&gt;&lt;a href="#fn-1" id="fnref-1" data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;. Other text.&lt;sup class="footnote-ref"&gt;&lt;a href="#fn-footnote" id="fnref-footnote" data-footnote-ref&gt;2&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;</span>
+<span id="LC2" class="line" lang="plaintext">&lt;p&gt;Here's a thing&lt;sup class="footnote-ref"&gt;&lt;a href="#fn-other-note" id="fnref-other-note" data-footnote-ref&gt;3&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;</span>
+<span id="LC3" class="line" lang="plaintext">&lt;p&gt;And another thing&lt;sup class="footnote-ref"&gt;&lt;a href="#fn-codeblock-note" id="fnref-codeblock-note" data-footnote-ref&gt;4&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;</span>
+<span id="LC4" class="line" lang="plaintext">&lt;p&gt;This doesn't have a referent[^nope].&lt;/p&gt;</span>
+<span id="LC5" class="line" lang="plaintext">&lt;p&gt;Hi!&lt;/p&gt;</span>
+<span id="LC6" class="line" lang="plaintext">&lt;section class="footnotes" data-footnotes&gt;</span>
+<span id="LC7" class="line" lang="plaintext">&lt;ol&gt;</span>
+<span id="LC8" class="line" lang="plaintext">&lt;li id="fn-1"&gt;</span>
+<span id="LC9" class="line" lang="plaintext">&lt;p&gt;Some &lt;em&gt;bolded&lt;/em&gt; footnote definition. &lt;a href="#fnref-1" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1"&gt;↩&lt;/a&gt;&lt;/p&gt;</span>
+<span id="LC10" class="line" lang="plaintext">&lt;/li&gt;</span>
+<span id="LC11" class="line" lang="plaintext">&lt;li id="fn-footnote"&gt;</span>
+<span id="LC12" class="line" lang="plaintext">&lt;blockquote&gt;</span>
+<span id="LC13" class="line" lang="plaintext">&lt;p&gt;Blockquotes can be in a footnote.&lt;/p&gt;</span>
+<span id="LC14" class="line" lang="plaintext">&lt;/blockquote&gt;</span>
+<span id="LC15" class="line" lang="plaintext">&lt;pre&gt;&lt;code&gt;as well as code blocks</span>
+<span id="LC16" class="line" lang="plaintext">&lt;/code&gt;&lt;/pre&gt;</span>
+<span id="LC17" class="line" lang="plaintext">&lt;p&gt;or, naturally, simple paragraphs. &lt;a href="#fnref-footnote" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="2" aria-label="Back to reference 2"&gt;↩&lt;/a&gt;&lt;/p&gt;</span>
+<span id="LC18" class="line" lang="plaintext">&lt;/li&gt;</span>
+<span id="LC19" class="line" lang="plaintext">&lt;li id="fn-other-note"&gt;</span>
+<span id="LC20" class="line" lang="plaintext">&lt;p&gt;no code block here (spaces are stripped away) &lt;a href="#fnref-other-note" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="3" aria-label="Back to reference 3"&gt;↩&lt;/a&gt;&lt;/p&gt;</span>
+<span id="LC21" class="line" lang="plaintext">&lt;/li&gt;</span>
+<span id="LC22" class="line" lang="plaintext">&lt;li id="fn-codeblock-note"&gt;</span>
+<span id="LC23" class="line" lang="plaintext">&lt;pre&gt;&lt;code&gt;this is now a code block (8 spaces indentation)</span>
+<span id="LC24" class="line" lang="plaintext">&lt;/code&gt;&lt;/pre&gt;</span>
+<span id="LC25" class="line" lang="plaintext">&lt;a href="#fnref-codeblock-note" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="4" aria-label="Back to reference 4"&gt;↩&lt;/a&gt;</span>
+<span id="LC26" class="line" lang="plaintext">&lt;/li&gt;</span>
+<span id="LC27" class="line" lang="plaintext">&lt;/ol&gt;</span>
+<span id="LC28" class="line" lang="plaintext">&lt;/section&gt;</span></code></pre>
+<copy-code></copy-code>
+</div>
+</div>
+<h2 data-sourcepos="15222:1-15222:71" dir="auto">
+<a id="user-content-when-a-footnote-is-used-multiple-times-we-insert-multiple-backrefs" class="anchor" href="#when-a-footnote-is-used-multiple-times-we-insert-multiple-backrefs" aria-hidden="true"></a>When a footnote is used multiple times, we insert multiple backrefs.</h2>
+<div>
+<div><a href="#example-756">Example 756</a></div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15227:1-15233:32" data-canonical-lang="example" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">This is some text. It has a footnote[^a-footnote].</span>
+<span id="LC2" class="line" lang="plaintext"></span>
+<span id="LC3" class="line" lang="plaintext">This footnote is referenced[^a-footnote] multiple times, in lots of different places.[^a-footnote]</span>
+<span id="LC4" class="line" lang="plaintext"></span>
+<span id="LC5" class="line" lang="plaintext">[^a-footnote]: This footnote definition should have three backrefs.</span></code></pre>
+<copy-code></copy-code>
+</div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15235:1-15245:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">&lt;p&gt;This is some text. It has a footnote&lt;sup class="footnote-ref"&gt;&lt;a href="#fn-a-footnote" id="fnref-a-footnote" data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;</span>
+<span id="LC2" class="line" lang="plaintext">&lt;p&gt;This footnote is referenced&lt;sup class="footnote-ref"&gt;&lt;a href="#fn-a-footnote" id="fnref-a-footnote-2" data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt; multiple times, in lots of different places.&lt;sup class="footnote-ref"&gt;&lt;a href="#fn-a-footnote" id="fnref-a-footnote-3" data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;</span>
+<span id="LC3" class="line" lang="plaintext">&lt;section class="footnotes" data-footnotes&gt;</span>
+<span id="LC4" class="line" lang="plaintext">&lt;ol&gt;</span>
+<span id="LC5" class="line" lang="plaintext">&lt;li id="fn-a-footnote"&gt;</span>
+<span id="LC6" class="line" lang="plaintext">&lt;p&gt;This footnote definition should have three backrefs. &lt;a href="#fnref-a-footnote" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1"&gt;↩&lt;/a&gt; &lt;a href="#fnref-a-footnote-2" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1-2" aria-label="Back to reference 1-2"&gt;↩&lt;sup class="footnote-ref"&gt;2&lt;/sup&gt;&lt;/a&gt; &lt;a href="#fnref-a-footnote-3" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1-3" aria-label="Back to reference 1-3"&gt;↩&lt;sup class="footnote-ref"&gt;3&lt;/sup&gt;&lt;/a&gt;&lt;/p&gt;</span>
+<span id="LC7" class="line" lang="plaintext">&lt;/li&gt;</span>
+<span id="LC8" class="line" lang="plaintext">&lt;/ol&gt;</span>
+<span id="LC9" class="line" lang="plaintext">&lt;/section&gt;</span></code></pre>
+<copy-code></copy-code>
+</div>
+</div>
+<h2 data-sourcepos="15248:1-15248:45" dir="auto">
+<a id="user-content-footnote-reference-labels-are-href-escaped" class="anchor" href="#footnote-reference-labels-are-href-escaped" aria-hidden="true"></a>Footnote reference labels are href escaped</h2>
+<div>
+<div><a href="#example-757">Example 757</a></div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15253:1-15257:32" data-canonical-lang="example" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">Hello[^"&gt;&lt;script&gt;alert(1)&lt;/script&gt;]</span>
+<span id="LC2" class="line" lang="plaintext"></span>
+<span id="LC3" class="line" lang="plaintext">[^"&gt;&lt;script&gt;alert(1)&lt;/script&gt;]: pwned</span></code></pre>
+<copy-code></copy-code>
+</div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15259:1-15268:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">&lt;p&gt;Hello&lt;sup class="footnote-ref"&gt;&lt;a href="#fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" id="fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" data-footnote-ref&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;</span>
+<span id="LC2" class="line" lang="plaintext">&lt;section class="footnotes" data-footnotes&gt;</span>
+<span id="LC3" class="line" lang="plaintext">&lt;ol&gt;</span>
+<span id="LC4" class="line" lang="plaintext">&lt;li id="fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E"&gt;</span>
+<span id="LC5" class="line" lang="plaintext">&lt;p&gt;pwned &lt;a href="#fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1"&gt;↩&lt;/a&gt;&lt;/p&gt;</span>
+<span id="LC6" class="line" lang="plaintext">&lt;/li&gt;</span>
+<span id="LC7" class="line" lang="plaintext">&lt;/ol&gt;</span>
+<span id="LC8" class="line" lang="plaintext">&lt;/section&gt;</span></code></pre>
+<copy-code></copy-code>
+</div>
+</div>
+<h2 data-sourcepos="15271:1-15271:10" dir="auto">
+<a id="user-content-interop" class="anchor" href="#interop" aria-hidden="true"></a>Interop</h2>
+<p data-sourcepos="15273:1-15273:27" dir="auto">Autolink and strikethrough.</p>
+<div>
+<div><a href="#example-758">Example 758</a></div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15278:1-15282:32" data-canonical-lang="example" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">~~www.google.com~~</span>
+<span id="LC2" class="line" lang="plaintext"></span>
+<span id="LC3" class="line" lang="plaintext">~~http://google.com~~</span></code></pre>
+<copy-code></copy-code>
+</div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15284:1-15287:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">&lt;p&gt;&lt;del&gt;&lt;a href="http://www.google.com"&gt;www.google.com&lt;/a&gt;&lt;/del&gt;&lt;/p&gt;</span>
+<span id="LC2" class="line" lang="plaintext">&lt;p&gt;&lt;del&gt;&lt;a href="http://google.com"&gt;http://google.com&lt;/a&gt;&lt;/del&gt;&lt;/p&gt;</span></code></pre>
+<copy-code></copy-code>
+</div>
+</div>
+<p data-sourcepos="15290:1-15290:20" dir="auto">Autolink and tables.</p>
+<div>
+<div><a href="#example-759">Example 759</a></div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15295:1-15299:32" data-canonical-lang="example" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">| a | b |</span>
+<span id="LC2" class="line" lang="plaintext">| --- | --- |</span>
+<span id="LC3" class="line" lang="plaintext">| https://github.com www.github.com | http://pokemon.com |</span></code></pre>
+<copy-code></copy-code>
+</div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15301:1-15316:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">&lt;table&gt;</span>
+<span id="LC2" class="line" lang="plaintext">&lt;thead&gt;</span>
+<span id="LC3" class="line" lang="plaintext">&lt;tr&gt;</span>
+<span id="LC4" class="line" lang="plaintext">&lt;th&gt;a&lt;/th&gt;</span>
+<span id="LC5" class="line" lang="plaintext">&lt;th&gt;b&lt;/th&gt;</span>
+<span id="LC6" class="line" lang="plaintext">&lt;/tr&gt;</span>
+<span id="LC7" class="line" lang="plaintext">&lt;/thead&gt;</span>
+<span id="LC8" class="line" lang="plaintext">&lt;tbody&gt;</span>
+<span id="LC9" class="line" lang="plaintext">&lt;tr&gt;</span>
+<span id="LC10" class="line" lang="plaintext">&lt;td&gt;&lt;a href="https://github.com"&gt;https://github.com&lt;/a&gt; &lt;a href="http://www.github.com"&gt;www.github.com&lt;/a&gt;&lt;/td&gt;</span>
+<span id="LC11" class="line" lang="plaintext">&lt;td&gt;&lt;a href="http://pokemon.com"&gt;http://pokemon.com&lt;/a&gt;&lt;/td&gt;</span>
+<span id="LC12" class="line" lang="plaintext">&lt;/tr&gt;</span>
+<span id="LC13" class="line" lang="plaintext">&lt;/tbody&gt;</span>
+<span id="LC14" class="line" lang="plaintext">&lt;/table&gt;</span></code></pre>
+<copy-code></copy-code>
+</div>
+</div>
+<h2 data-sourcepos="15319:1-15319:13" dir="auto">
+<a id="user-content-task-lists" class="anchor" href="#task-lists" aria-hidden="true"></a>Task lists</h2>
+<div>
+<div><a href="#example-760">Example 760</a></div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15324:1-15327:32" data-canonical-lang="example" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">- [ ] foo</span>
+<span id="LC2" class="line" lang="plaintext">- [x] bar</span></code></pre>
+<copy-code></copy-code>
+</div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15329:1-15334:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">&lt;ul&gt;</span>
+<span id="LC2" class="line" lang="plaintext">&lt;li&gt;&lt;input type="checkbox" disabled="" /&gt; foo&lt;/li&gt;</span>
+<span id="LC3" class="line" lang="plaintext">&lt;li&gt;&lt;input type="checkbox" checked="" disabled="" /&gt; bar&lt;/li&gt;</span>
+<span id="LC4" class="line" lang="plaintext">&lt;/ul&gt;</span></code></pre>
+<copy-code></copy-code>
+</div>
+</div>
+<p data-sourcepos="15337:1-15342:37" dir="auto">Show that a task list and a regular list get processed the same in
+the way that sublists are created. If something works in a list
+item, then it should work the same way with a task.  The only
+difference should be the tasklist marker. So, if we use something
+other than a space or x, it won't be recognized as a task item, and
+so will be treated as a regular item.</p>
+<div>
+<div><a href="#example-761">Example 761</a></div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15347:1-15358:32" data-canonical-lang="example" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">- [x] foo</span>
+<span id="LC2" class="line" lang="plaintext">  - [ ] bar</span>
+<span id="LC3" class="line" lang="plaintext">  - [x] baz</span>
+<span id="LC4" class="line" lang="plaintext">- [ ] bim</span>
+<span id="LC5" class="line" lang="plaintext"></span>
+<span id="LC6" class="line" lang="plaintext">Show a regular (non task) list to show that it has the same structure</span>
+<span id="LC7" class="line" lang="plaintext">- [@] foo</span>
+<span id="LC8" class="line" lang="plaintext">  - [@] bar</span>
+<span id="LC9" class="line" lang="plaintext">  - [@] baz</span>
+<span id="LC10" class="line" lang="plaintext">- [@] bim</span></code></pre>
+<copy-code></copy-code>
+</div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15360:1-15380:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">&lt;ul&gt;</span>
+<span id="LC2" class="line" lang="plaintext">&lt;li&gt;&lt;input type="checkbox" checked="" disabled="" /&gt; foo</span>
+<span id="LC3" class="line" lang="plaintext">&lt;ul&gt;</span>
+<span id="LC4" class="line" lang="plaintext">&lt;li&gt;&lt;input type="checkbox" disabled="" /&gt; bar&lt;/li&gt;</span>
+<span id="LC5" class="line" lang="plaintext">&lt;li&gt;&lt;input type="checkbox" checked="" disabled="" /&gt; baz&lt;/li&gt;</span>
+<span id="LC6" class="line" lang="plaintext">&lt;/ul&gt;</span>
+<span id="LC7" class="line" lang="plaintext">&lt;/li&gt;</span>
+<span id="LC8" class="line" lang="plaintext">&lt;li&gt;&lt;input type="checkbox" disabled="" /&gt; bim&lt;/li&gt;</span>
+<span id="LC9" class="line" lang="plaintext">&lt;/ul&gt;</span>
+<span id="LC10" class="line" lang="plaintext">&lt;p&gt;Show a regular (non task) list to show that it has the same structure&lt;/p&gt;</span>
+<span id="LC11" class="line" lang="plaintext">&lt;ul&gt;</span>
+<span id="LC12" class="line" lang="plaintext">&lt;li&gt;[@] foo</span>
+<span id="LC13" class="line" lang="plaintext">&lt;ul&gt;</span>
+<span id="LC14" class="line" lang="plaintext">&lt;li&gt;[@] bar&lt;/li&gt;</span>
+<span id="LC15" class="line" lang="plaintext">&lt;li&gt;[@] baz&lt;/li&gt;</span>
+<span id="LC16" class="line" lang="plaintext">&lt;/ul&gt;</span>
+<span id="LC17" class="line" lang="plaintext">&lt;/li&gt;</span>
+<span id="LC18" class="line" lang="plaintext">&lt;li&gt;[@] bim&lt;/li&gt;</span>
+<span id="LC19" class="line" lang="plaintext">&lt;/ul&gt;</span></code></pre>
+<copy-code></copy-code>
+</div>
+</div>
+Use a larger indent -- a task list and a regular list should produce
+the same structure.
+<div>
+<div><a href="#example-762">Example 762</a></div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15388:1-15399:32" data-canonical-lang="example" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">- [x] foo</span>
+<span id="LC2" class="line" lang="plaintext">    - [ ] bar</span>
+<span id="LC3" class="line" lang="plaintext">    - [x] baz</span>
+<span id="LC4" class="line" lang="plaintext">- [ ] bim</span>
+<span id="LC5" class="line" lang="plaintext"></span>
+<span id="LC6" class="line" lang="plaintext">Show a regular (non task) list to show that it has the same structure</span>
+<span id="LC7" class="line" lang="plaintext">- [@] foo</span>
+<span id="LC8" class="line" lang="plaintext">    - [@] bar</span>
+<span id="LC9" class="line" lang="plaintext">    - [@] baz</span>
+<span id="LC10" class="line" lang="plaintext">- [@] bim</span></code></pre>
+<copy-code></copy-code>
+</div>
+<div class="gl-relative markdown-code-block js-markdown-code">
+<pre data-sourcepos="15401:1-15421:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">&lt;ul&gt;</span>
+<span id="LC2" class="line" lang="plaintext">&lt;li&gt;&lt;input type="checkbox" checked="" disabled="" /&gt; foo</span>
+<span id="LC3" class="line" lang="plaintext">&lt;ul&gt;</span>
+<span id="LC4" class="line" lang="plaintext">&lt;li&gt;&lt;input type="checkbox" disabled="" /&gt; bar&lt;/li&gt;</span>
+<span id="LC5" class="line" lang="plaintext">&lt;li&gt;&lt;input type="checkbox" checked="" disabled="" /&gt; baz&lt;/li&gt;</span>
+<span id="LC6" class="line" lang="plaintext">&lt;/ul&gt;</span>
+<span id="LC7" class="line" lang="plaintext">&lt;/li&gt;</span>
+<span id="LC8" class="line" lang="plaintext">&lt;li&gt;&lt;input type="checkbox" disabled="" /&gt; bim&lt;/li&gt;</span>
+<span id="LC9" class="line" lang="plaintext">&lt;/ul&gt;</span>
+<span id="LC10" class="line" lang="plaintext">&lt;p&gt;Show a regular (non task) list to show that it has the same structure&lt;/p&gt;</span>
+<span id="LC11" class="line" lang="plaintext">&lt;ul&gt;</span>
+<span id="LC12" class="line" lang="plaintext">&lt;li&gt;[@] foo</span>
+<span id="LC13" class="line" lang="plaintext">&lt;ul&gt;</span>
+<span id="LC14" class="line" lang="plaintext">&lt;li&gt;[@] bar&lt;/li&gt;</span>
+<span id="LC15" class="line" lang="plaintext">&lt;li&gt;[@] baz&lt;/li&gt;</span>
+<span id="LC16" class="line" lang="plaintext">&lt;/ul&gt;</span>
+<span id="LC17" class="line" lang="plaintext">&lt;/li&gt;</span>
+<span id="LC18" class="line" lang="plaintext">&lt;li&gt;[@] bim&lt;/li&gt;</span>
+<span id="LC19" class="line" lang="plaintext">&lt;/ul&gt;</span></code></pre>
+<copy-code></copy-code>
+</div>
+</div>
+
 
 </body>
 </html>
diff --git a/glfm_specification/output_example_snapshots/snapshot_spec.md b/glfm_specification/output_example_snapshots/snapshot_spec.md
index 3b3628032bf7d..a22d9b41ea786 100644
--- a/glfm_specification/output_example_snapshots/snapshot_spec.md
+++ b/glfm_specification/output_example_snapshots/snapshot_spec.md
@@ -10625,3 +10625,231 @@ footnote text
 </section>
 ````````````````````````````````
 
+# GFM undocumented extensions and more robust test
+
+This section contains tests borrowed from https://github.com/github/cmark-gfm/blob/master/test/extensions.txt.
+It includes items not found in the official GFM specification, such as footnotes and additional tests for tables,
+task lists, etc.
+
+## Footnotes
+
+```````````````````````````````` example
+This is some text![^1]. Other text.[^footnote].
+
+Here's a thing[^other-note].
+
+And another thing[^codeblock-note].
+
+This doesn't have a referent[^nope].
+
+
+[^other-note]:       no code block here (spaces are stripped away)
+
+[^codeblock-note]:
+        this is now a code block (8 spaces indentation)
+
+[^1]: Some *bolded* footnote definition.
+
+Hi!
+
+[^footnote]:
+    > Blockquotes can be in a footnote.
+
+        as well as code blocks
+
+    or, naturally, simple paragraphs.
+
+[^unused]: This is unused.
+.
+<p>This is some text!<sup class="footnote-ref"><a href="#fn-1" id="fnref-1" data-footnote-ref>1</a></sup>. Other text.<sup class="footnote-ref"><a href="#fn-footnote" id="fnref-footnote" data-footnote-ref>2</a></sup>.</p>
+<p>Here's a thing<sup class="footnote-ref"><a href="#fn-other-note" id="fnref-other-note" data-footnote-ref>3</a></sup>.</p>
+<p>And another thing<sup class="footnote-ref"><a href="#fn-codeblock-note" id="fnref-codeblock-note" data-footnote-ref>4</a></sup>.</p>
+<p>This doesn't have a referent[^nope].</p>
+<p>Hi!</p>
+<section class="footnotes" data-footnotes>
+<ol>
+<li id="fn-1">
+<p>Some <em>bolded</em> footnote definition. <a href="#fnref-1" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1">↩</a></p>
+</li>
+<li id="fn-footnote">
+<blockquote>
+<p>Blockquotes can be in a footnote.</p>
+</blockquote>
+<pre><code>as well as code blocks
+</code></pre>
+<p>or, naturally, simple paragraphs. <a href="#fnref-footnote" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="2" aria-label="Back to reference 2">↩</a></p>
+</li>
+<li id="fn-other-note">
+<p>no code block here (spaces are stripped away) <a href="#fnref-other-note" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="3" aria-label="Back to reference 3">↩</a></p>
+</li>
+<li id="fn-codeblock-note">
+<pre><code>this is now a code block (8 spaces indentation)
+</code></pre>
+<a href="#fnref-codeblock-note" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="4" aria-label="Back to reference 4">↩</a>
+</li>
+</ol>
+</section>
+````````````````````````````````
+
+## When a footnote is used multiple times, we insert multiple backrefs.
+
+```````````````````````````````` example
+This is some text. It has a footnote[^a-footnote].
+
+This footnote is referenced[^a-footnote] multiple times, in lots of different places.[^a-footnote]
+
+[^a-footnote]: This footnote definition should have three backrefs.
+.
+<p>This is some text. It has a footnote<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote" data-footnote-ref>1</a></sup>.</p>
+<p>This footnote is referenced<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote-2" data-footnote-ref>1</a></sup> multiple times, in lots of different places.<sup class="footnote-ref"><a href="#fn-a-footnote" id="fnref-a-footnote-3" data-footnote-ref>1</a></sup></p>
+<section class="footnotes" data-footnotes>
+<ol>
+<li id="fn-a-footnote">
+<p>This footnote definition should have three backrefs. <a href="#fnref-a-footnote" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1">↩</a> <a href="#fnref-a-footnote-2" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1-2" aria-label="Back to reference 1-2">↩<sup class="footnote-ref">2</sup></a> <a href="#fnref-a-footnote-3" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1-3" aria-label="Back to reference 1-3">↩<sup class="footnote-ref">3</sup></a></p>
+</li>
+</ol>
+</section>
+````````````````````````````````
+
+## Footnote reference labels are href escaped
+
+```````````````````````````````` example
+Hello[^"><script>alert(1)</script>]
+
+[^"><script>alert(1)</script>]: pwned
+.
+<p>Hello<sup class="footnote-ref"><a href="#fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" id="fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" data-footnote-ref>1</a></sup></p>
+<section class="footnotes" data-footnotes>
+<ol>
+<li id="fn-%22%3E%3Cscript%3Ealert(1)%3C/script%3E">
+<p>pwned <a href="#fnref-%22%3E%3Cscript%3Ealert(1)%3C/script%3E" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1">↩</a></p>
+</li>
+</ol>
+</section>
+````````````````````````````````
+
+## Interop
+
+Autolink and strikethrough.
+
+```````````````````````````````` example
+~~www.google.com~~
+
+~~http://google.com~~
+.
+<p><del><a href="http://www.google.com">www.google.com</a></del></p>
+<p><del><a href="http://google.com">http://google.com</a></del></p>
+````````````````````````````````
+
+Autolink and tables.
+
+```````````````````````````````` example
+| a | b |
+| --- | --- |
+| https://github.com www.github.com | http://pokemon.com |
+.
+<table>
+<thead>
+<tr>
+<th>a</th>
+<th>b</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><a href="https://github.com">https://github.com</a> <a href="http://www.github.com">www.github.com</a></td>
+<td><a href="http://pokemon.com">http://pokemon.com</a></td>
+</tr>
+</tbody>
+</table>
+````````````````````````````````
+
+## Task lists
+
+```````````````````````````````` example
+- [ ] foo
+- [x] bar
+.
+<ul>
+<li><input type="checkbox" disabled="" /> foo</li>
+<li><input type="checkbox" checked="" disabled="" /> bar</li>
+</ul>
+````````````````````````````````
+
+Show that a task list and a regular list get processed the same in
+the way that sublists are created. If something works in a list
+item, then it should work the same way with a task.  The only
+difference should be the tasklist marker. So, if we use something
+other than a space or x, it won't be recognized as a task item, and
+so will be treated as a regular item.
+
+```````````````````````````````` example
+- [x] foo
+  - [ ] bar
+  - [x] baz
+- [ ] bim
+
+Show a regular (non task) list to show that it has the same structure
+- [@] foo
+  - [@] bar
+  - [@] baz
+- [@] bim
+.
+<ul>
+<li><input type="checkbox" checked="" disabled="" /> foo
+<ul>
+<li><input type="checkbox" disabled="" /> bar</li>
+<li><input type="checkbox" checked="" disabled="" /> baz</li>
+</ul>
+</li>
+<li><input type="checkbox" disabled="" /> bim</li>
+</ul>
+<p>Show a regular (non task) list to show that it has the same structure</p>
+<ul>
+<li>[@] foo
+<ul>
+<li>[@] bar</li>
+<li>[@] baz</li>
+</ul>
+</li>
+<li>[@] bim</li>
+</ul>
+````````````````````````````````
+Use a larger indent -- a task list and a regular list should produce
+the same structure.
+
+```````````````````````````````` example
+- [x] foo
+    - [ ] bar
+    - [x] baz
+- [ ] bim
+
+Show a regular (non task) list to show that it has the same structure
+- [@] foo
+    - [@] bar
+    - [@] baz
+- [@] bim
+.
+<ul>
+<li><input type="checkbox" checked="" disabled="" /> foo
+<ul>
+<li><input type="checkbox" disabled="" /> bar</li>
+<li><input type="checkbox" checked="" disabled="" /> baz</li>
+</ul>
+</li>
+<li><input type="checkbox" disabled="" /> bim</li>
+</ul>
+<p>Show a regular (non task) list to show that it has the same structure</p>
+<ul>
+<li>[@] foo
+<ul>
+<li>[@] bar</li>
+<li>[@] baz</li>
+</ul>
+</li>
+<li>[@] bim</li>
+</ul>
+````````````````````````````````
+
+<!-- end of the "GFM undocumented extensions and more robust test" section -->
+
-- 
GitLab