aboutsummaryrefslogtreecommitdiffstats
path: root/tests/footnote.html
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2007-11-29 17:18:33 +0000
committerWaylan Limberg <waylan@gmail.com>2007-11-29 17:18:33 +0000
commit9f8372ece0b824e2038a7b728064ae454283db68 (patch)
tree8bbc4f1fc58636beb828f4ff2ad51745de413242 /tests/footnote.html
parent991ea1682465bd6f3e41e1d22fc541f41dd78c5e (diff)
downloadmarkdown-9f8372ece0b824e2038a7b728064ae454283db68.tar.gz
markdown-9f8372ece0b824e2038a7b728064ae454283db68.tar.bz2
markdown-9f8372ece0b824e2038a7b728064ae454283db68.zip
Footnotes that end in anyting but a <p> (list, blockquote, codeblock) now have
the backlink in a <p> which is appended to the end of the footnote. Fixes [1831600] Also fixed multiparagraph footnotes so that the first paragraph is actually wrapped in a <p> element. This results in one-liners also wrapped in <p> elements, but this is inline with PHP Markdown Extra's behavior. That means the test for `node.type == "text"` should never get a match, but I'm leaving it in for now. Also added some tests, although they are not properly included in a test directory for use with the testing framework. Seeing the framework currently ignores extensions, we'll worry about that later.
Diffstat (limited to 'tests/footnote.html')
-rw-r--r--tests/footnote.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/footnote.html b/tests/footnote.html
new file mode 100644
index 0000000..6114176
--- /dev/null
+++ b/tests/footnote.html
@@ -0,0 +1,40 @@
+<p>This is the body with a footnote<sup id="fnr1-429656941"><a href="#fn1-429656941">1</a></sup> or two<sup id="fnr2-429656941"><a href="#fn2-429656941">2</a></sup> or more<sup id="fnr3-429656941"><a href="#fn3-429656941">3</a></sup> <sup id="fnr4-429656941"><a href="#fn4-429656941">4</a></sup>.
+</p>
+
+<div class="footnote"><hr/><ol>
+ <li id="fn1-429656941"><p>Footnote that ends with a list:
+</p>
+<ul>
+ <li>
+ item 1
+ </li>
+
+ <li>
+ item 2
+ </li>
+</ul>
+<p><a href="#fnr1-429656941" class="footnoteBackLink" title="Jump back to footnote 1 in the text">&#8617;</a>
+</p>
+
+ </li>
+
+ <li id="fn2-429656941"><blockquote><p>This footnote is a blockquote.
+</p>
+</blockquote><p><a href="#fnr2-429656941" class="footnoteBackLink" title="Jump back to footnote 1 in the text">&#8617;</a>
+</p>
+
+ </li>
+
+ <li id="fn3-429656941"><p>A simple oneliner.<a href="#fnr3-429656941" class="footnoteBackLink" title="Jump back to footnote 1 in the text">&#8617;</a>
+</p>
+
+ </li>
+
+ <li id="fn4-429656941"><p>A footnote with multiple paragraphs.
+</p>
+<p>Paragraph two.<a href="#fnr4-429656941" class="footnoteBackLink" title="Jump back to footnote 1 in the text">&#8617;</a>
+</p>
+
+ </li>
+</ol>
+</div> \ No newline at end of file