summaryrefslogtreecommitdiff
path: root/t/docs-pythonmarkdown2-tm-cases-pass
diff options
context:
space:
mode:
Diffstat (limited to 't/docs-pythonmarkdown2-tm-cases-pass')
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/auto_link.html3
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/auto_link.text3
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/auto_link_safe_mode.html3
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/auto_link_safe_mode.opts1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/auto_link_safe_mode.text3
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode.html5
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode.opts2
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode.text5
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode_escape.html5
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode_escape.opts1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode_escape.text5
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/blockquote.html11
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/blockquote.text5
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/blockquote_with_pre.html9
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/blockquote_with_pre.text6
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/code_block_with_tabs.html4
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/code_block_with_tabs.text3
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/code_safe_emphasis.html2
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/code_safe_emphasis.opts1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/code_safe_emphasis.text2
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/codeblock.html8
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/codeblock.text7
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/codespans.html2
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/codespans.text2
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/codespans_safe_mode.html2
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/codespans_safe_mode.opts1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/codespans_safe_mode.text2
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/emacs_head_vars.html4
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/emacs_head_vars.text4
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/emacs_tail_vars.html8
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/emacs_tail_vars.text8
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/emphasis.html2
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/emphasis.text2
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/escapes.html3
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/escapes.text3
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/footnotes.html27
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/footnotes.opts1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/footnotes.text18
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/footnotes_letters.html23
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/footnotes_letters.opts1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/footnotes_letters.text15
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/footnotes_markup.html22
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/footnotes_markup.opts1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/footnotes_markup.text10
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/footnotes_safe_mode_escape.html12
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/footnotes_safe_mode_escape.opts1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/footnotes_safe_mode_escape.text6
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/header.html7
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/header.text9
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/hr.html12
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/hr.text12
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/img_in_link.html4
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/img_in_link.text7
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/inline_links.html7
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/inline_links.text7
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/issue2_safe_mode_borks_markup.html5
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/issue2_safe_mode_borks_markup.opts1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/issue2_safe_mode_borks_markup.text6
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/link_defn_alt_title_delims.html3
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/link_defn_alt_title_delims.text7
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/link_patterns.html1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/link_patterns.opts7
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/link_patterns.text1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_double_hit.html1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_double_hit.opts7
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_double_hit.text1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_edge_cases.html1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_edge_cases.opts6
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_edge_cases.text1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/lists.html15
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/lists.text11
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/mismatched_footnotes.html16
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/mismatched_footnotes.opts1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/mismatched_footnotes.text9
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/missing_link_defn.html1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/missing_link_defn.text7
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/nested_list.html15
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/nested_list.text9
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/nested_list_safe_mode.html15
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/nested_list_safe_mode.opts1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/nested_list_safe_mode.text9
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/parens_in_url_4.html1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/parens_in_url_4.text1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/raw_html.html5
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/raw_html.text6
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/ref_links.html1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/ref_links.text6
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/sublist-para.html17
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/sublist-para.text17
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/syntax_color.html15
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/syntax_color.opts1
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/syntax_color.text15
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/tricky_anchors.html11
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/tricky_anchors.text11
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/underline_in_autolink.html2
-rw-r--r--t/docs-pythonmarkdown2-tm-cases-pass/underline_in_autolink.text2
96 files changed, 607 insertions, 0 deletions
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/auto_link.html b/t/docs-pythonmarkdown2-tm-cases-pass/auto_link.html
new file mode 100644
index 0000000..e4dde05
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/auto_link.html
@@ -0,0 +1,3 @@
+<p>I can has autolink? <a href="http://icanhascheeseburger.com">http://icanhascheeseburger.com</a></p>
+
+<p>Ask garfield: <a href="&#x6D;a&#x69;&#108;&#x74;&#111;:&#103;&#x61;&#114;f&#x69;&#x65;&#108;&#x64;&#64;&#x65;&#120;&#97;&#109;&#112;&#x6C;&#x65;&#46;&#99;&#x6F;&#109;">&#103;&#x61;&#114;f&#x69;&#x65;&#108;&#x64;&#64;&#x65;&#120;&#97;&#109;&#112;&#x6C;&#x65;&#46;&#99;&#x6F;&#109;</a></p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/auto_link.text b/t/docs-pythonmarkdown2-tm-cases-pass/auto_link.text
new file mode 100644
index 0000000..e5354cd
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/auto_link.text
@@ -0,0 +1,3 @@
+I can has autolink? <http://icanhascheeseburger.com>
+
+Ask garfield: <garfield@example.com>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/auto_link_safe_mode.html b/t/docs-pythonmarkdown2-tm-cases-pass/auto_link_safe_mode.html
new file mode 100644
index 0000000..e4dde05
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/auto_link_safe_mode.html
@@ -0,0 +1,3 @@
+<p>I can has autolink? <a href="http://icanhascheeseburger.com">http://icanhascheeseburger.com</a></p>
+
+<p>Ask garfield: <a href="&#x6D;a&#x69;&#108;&#x74;&#111;:&#103;&#x61;&#114;f&#x69;&#x65;&#108;&#x64;&#64;&#x65;&#120;&#97;&#109;&#112;&#x6C;&#x65;&#46;&#99;&#x6F;&#109;">&#103;&#x61;&#114;f&#x69;&#x65;&#108;&#x64;&#64;&#x65;&#120;&#97;&#109;&#112;&#x6C;&#x65;&#46;&#99;&#x6F;&#109;</a></p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/auto_link_safe_mode.opts b/t/docs-pythonmarkdown2-tm-cases-pass/auto_link_safe_mode.opts
new file mode 100644
index 0000000..ccb6a09
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/auto_link_safe_mode.opts
@@ -0,0 +1 @@
+{'safe_mode': True}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/auto_link_safe_mode.text b/t/docs-pythonmarkdown2-tm-cases-pass/auto_link_safe_mode.text
new file mode 100644
index 0000000..e5354cd
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/auto_link_safe_mode.text
@@ -0,0 +1,3 @@
+I can has autolink? <http://icanhascheeseburger.com>
+
+Ask garfield: <garfield@example.com>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode.html b/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode.html
new file mode 100644
index 0000000..393e9d2
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode.html
@@ -0,0 +1,5 @@
+<p>blah [HTML_REMOVED] blah</p>
+
+<p>[HTML_REMOVED]yowzer![HTML_REMOVED]</p>
+
+<p>blah</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode.opts b/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode.opts
new file mode 100644
index 0000000..e74c7cc
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode.opts
@@ -0,0 +1,2 @@
+# Use the old (for-compat-only) way of specifying "replace" safe mode.
+{"safe_mode": True}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode.text b/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode.text
new file mode 100644
index 0000000..ee04231
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode.text
@@ -0,0 +1,5 @@
+blah <img src="dangerous"> blah
+
+<div>yowzer!</div>
+
+blah
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode_escape.html b/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode_escape.html
new file mode 100644
index 0000000..af24510
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode_escape.html
@@ -0,0 +1,5 @@
+<p>blah &lt;img src="dangerous"&gt; blah</p>
+
+<p>&lt;div&gt;yowzer!&lt;/div&gt;</p>
+
+<p>blah</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode_escape.opts b/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode_escape.opts
new file mode 100644
index 0000000..ad487c0
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode_escape.opts
@@ -0,0 +1 @@
+{"safe_mode": "escape"}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode_escape.text b/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode_escape.text
new file mode 100644
index 0000000..ee04231
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/basic_safe_mode_escape.text
@@ -0,0 +1,5 @@
+blah <img src="dangerous"> blah
+
+<div>yowzer!</div>
+
+blah
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/blockquote.html b/t/docs-pythonmarkdown2-tm-cases-pass/blockquote.html
new file mode 100644
index 0000000..5cde1cb
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/blockquote.html
@@ -0,0 +1,11 @@
+<p>[Trent wrote]</p>
+
+<blockquote>
+ <p>no way</p>
+</blockquote>
+
+<p>[Jeff wrote]</p>
+
+<blockquote>
+ <p>way</p>
+</blockquote>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/blockquote.text b/t/docs-pythonmarkdown2-tm-cases-pass/blockquote.text
new file mode 100644
index 0000000..3bcecaa
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/blockquote.text
@@ -0,0 +1,5 @@
+[Trent wrote]
+> no way
+
+[Jeff wrote]
+> way
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/blockquote_with_pre.html b/t/docs-pythonmarkdown2-tm-cases-pass/blockquote_with_pre.html
new file mode 100644
index 0000000..d03cc78
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/blockquote_with_pre.html
@@ -0,0 +1,9 @@
+<blockquote>
+ <p>Markdown indents blockquotes a couple of spaces
+ necessitating some tweaks for pre-blocks in that
+ blockquote:</p>
+
+<pre><code>here is a check
+for that
+</code></pre>
+</blockquote>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/blockquote_with_pre.text b/t/docs-pythonmarkdown2-tm-cases-pass/blockquote_with_pre.text
new file mode 100644
index 0000000..e61b82f
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/blockquote_with_pre.text
@@ -0,0 +1,6 @@
+> Markdown indents blockquotes a couple of spaces
+> necessitating some tweaks for pre-blocks in that
+> blockquote:
+>
+> here is a check
+> for that
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/code_block_with_tabs.html b/t/docs-pythonmarkdown2-tm-cases-pass/code_block_with_tabs.html
new file mode 100644
index 0000000..6c32e46
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/code_block_with_tabs.html
@@ -0,0 +1,4 @@
+<p>Test with tabs for <code>_Detab</code>:</p>
+
+<pre><code>Code 'block' with some "tabs" and "quotes"
+</code></pre>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/code_block_with_tabs.text b/t/docs-pythonmarkdown2-tm-cases-pass/code_block_with_tabs.text
new file mode 100644
index 0000000..bcf94c4
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/code_block_with_tabs.text
@@ -0,0 +1,3 @@
+Test with tabs for `_Detab`:
+
+ Code 'block' with some "tabs" and "quotes"
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/code_safe_emphasis.html b/t/docs-pythonmarkdown2-tm-cases-pass/code_safe_emphasis.html
new file mode 100644
index 0000000..f53e6a5
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/code_safe_emphasis.html
@@ -0,0 +1,2 @@
+<p>This is <em>italic</em> and this is <strong>bold</strong>.
+This is NOT _italic_ and this is __bold__ because --code-safe is turned on.</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/code_safe_emphasis.opts b/t/docs-pythonmarkdown2-tm-cases-pass/code_safe_emphasis.opts
new file mode 100644
index 0000000..cd0b9d6
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/code_safe_emphasis.opts
@@ -0,0 +1 @@
+{"extras": ["code-friendly"]}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/code_safe_emphasis.text b/t/docs-pythonmarkdown2-tm-cases-pass/code_safe_emphasis.text
new file mode 100644
index 0000000..6e9df74
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/code_safe_emphasis.text
@@ -0,0 +1,2 @@
+This is *italic* and this is **bold**.
+This is NOT _italic_ and this is __bold__ because --code-safe is turned on.
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/codeblock.html b/t/docs-pythonmarkdown2-tm-cases-pass/codeblock.html
new file mode 100644
index 0000000..bf7f5c2
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/codeblock.html
@@ -0,0 +1,8 @@
+<pre><code>some code
+</code></pre>
+
+<p>some 'splaining</p>
+
+<pre><code>some more code
+2 &gt; 1
+</code></pre>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/codeblock.text b/t/docs-pythonmarkdown2-tm-cases-pass/codeblock.text
new file mode 100644
index 0000000..d374216
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/codeblock.text
@@ -0,0 +1,7 @@
+ some code
+
+some 'splaining
+
+ some more code
+ 2 > 1
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/codespans.html b/t/docs-pythonmarkdown2-tm-cases-pass/codespans.html
new file mode 100644
index 0000000..3528bcd
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/codespans.html
@@ -0,0 +1,2 @@
+<p><code>This</code> is a code span.
+And <code>This is one with an `embedded backtick`</code>.</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/codespans.text b/t/docs-pythonmarkdown2-tm-cases-pass/codespans.text
new file mode 100644
index 0000000..67015a9
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/codespans.text
@@ -0,0 +1,2 @@
+`This` is a code span.
+And ``This is one with an `embedded backtick` ``.
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/codespans_safe_mode.html b/t/docs-pythonmarkdown2-tm-cases-pass/codespans_safe_mode.html
new file mode 100644
index 0000000..3528bcd
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/codespans_safe_mode.html
@@ -0,0 +1,2 @@
+<p><code>This</code> is a code span.
+And <code>This is one with an `embedded backtick`</code>.</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/codespans_safe_mode.opts b/t/docs-pythonmarkdown2-tm-cases-pass/codespans_safe_mode.opts
new file mode 100644
index 0000000..ccb6a09
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/codespans_safe_mode.opts
@@ -0,0 +1 @@
+{'safe_mode': True}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/codespans_safe_mode.text b/t/docs-pythonmarkdown2-tm-cases-pass/codespans_safe_mode.text
new file mode 100644
index 0000000..67015a9
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/codespans_safe_mode.text
@@ -0,0 +1,2 @@
+`This` is a code span.
+And ``This is one with an `embedded backtick` ``.
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/emacs_head_vars.html b/t/docs-pythonmarkdown2-tm-cases-pass/emacs_head_vars.html
new file mode 100644
index 0000000..b194eb9
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/emacs_head_vars.html
@@ -0,0 +1,4 @@
+<!-- -*- markdown-extras: code-friendly -*- -->
+
+<p>This sentence talks about the Python __init__ method, which I'd rather not be
+interpreted as Markdown's strong.</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/emacs_head_vars.text b/t/docs-pythonmarkdown2-tm-cases-pass/emacs_head_vars.text
new file mode 100644
index 0000000..2d05ab8
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/emacs_head_vars.text
@@ -0,0 +1,4 @@
+<!-- -*- markdown-extras: code-friendly -*- -->
+
+This sentence talks about the Python __init__ method, which I'd rather not be
+interpreted as Markdown's strong.
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/emacs_tail_vars.html b/t/docs-pythonmarkdown2-tm-cases-pass/emacs_tail_vars.html
new file mode 100644
index 0000000..8b47011
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/emacs_tail_vars.html
@@ -0,0 +1,8 @@
+<p>This sentence talks about the Python __init__ method, which I'd rather not be
+interpreted as Markdown's strong.</p>
+
+<!--
+ Local Variables:
+ markdown-extras: code-friendly
+ End:
+ -->
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/emacs_tail_vars.text b/t/docs-pythonmarkdown2-tm-cases-pass/emacs_tail_vars.text
new file mode 100644
index 0000000..400d2eb
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/emacs_tail_vars.text
@@ -0,0 +1,8 @@
+This sentence talks about the Python __init__ method, which I'd rather not be
+interpreted as Markdown's strong.
+
+<!--
+ Local Variables:
+ markdown-extras: code-friendly
+ End:
+ -->
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/emphasis.html b/t/docs-pythonmarkdown2-tm-cases-pass/emphasis.html
new file mode 100644
index 0000000..a850dc9
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/emphasis.html
@@ -0,0 +1,2 @@
+<p>This is <em>italic</em> and this is <strong>bold</strong>.
+This is also <em>italic</em> and this is <strong>bold</strong>.</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/emphasis.text b/t/docs-pythonmarkdown2-tm-cases-pass/emphasis.text
new file mode 100644
index 0000000..99c324e
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/emphasis.text
@@ -0,0 +1,2 @@
+This is *italic* and this is **bold**.
+This is also _italic_ and this is __bold__.
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/escapes.html b/t/docs-pythonmarkdown2-tm-cases-pass/escapes.html
new file mode 100644
index 0000000..9670548
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/escapes.html
@@ -0,0 +1,3 @@
+<p>**don't shout**</p>
+
+<p>*don't emphasize*</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/escapes.text b/t/docs-pythonmarkdown2-tm-cases-pass/escapes.text
new file mode 100644
index 0000000..a79164e
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/escapes.text
@@ -0,0 +1,3 @@
+\*\*don't shout\*\*
+
+\*don't emphasize\*
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/footnotes.html b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes.html
new file mode 100644
index 0000000..37c6d8b
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes.html
@@ -0,0 +1,27 @@
+<p>This is a para with a footnote.<sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup></p>
+
+<p>This is another para with a footnote<sup class="footnote-ref" id="fnref-2"><a href="#fn-2">2</a></sup> in it. Actually it has two<sup class="footnote-ref" id="fnref-3"><a href="#fn-3">3</a></sup> of
+them. No, three<sup class="footnote-ref" id="fnref-4"><a href="#fn-4">4</a></sup>.</p>
+
+<div class="footnotes">
+<hr />
+<ol>
+<li id="fn-1">
+<p>Here is the body of the first footnote.&nbsp;<a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">&#8617;</a></p>
+</li>
+
+<li id="fn-2">
+<p>And of the second footnote.</p>
+
+<p>This one has multiple paragraphs.&nbsp;<a href="#fnref-2" class="footnoteBackLink" title="Jump back to footnote 2 in the text.">&#8617;</a></p>
+</li>
+
+<li id="fn-3">
+<p>Here is a footnote body that starts on next line.&nbsp;<a href="#fnref-3" class="footnoteBackLink" title="Jump back to footnote 3 in the text.">&#8617;</a></p>
+</li>
+
+<li id="fn-4">
+<p>quickie "that looks like a link ref if not careful"&nbsp;<a href="#fnref-4" class="footnoteBackLink" title="Jump back to footnote 4 in the text.">&#8617;</a></p>
+</li>
+</ol>
+</div>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/footnotes.opts b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes.opts
new file mode 100644
index 0000000..9dfee9e
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes.opts
@@ -0,0 +1 @@
+{"extras": ["footnotes"]}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/footnotes.text b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes.text
new file mode 100644
index 0000000..7d6e716
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes.text
@@ -0,0 +1,18 @@
+This is a para with a footnote.[^1]
+
+This is another para with a footnote[^2] in it. Actually it has two[^3] of
+them. No, three[^4].
+
+
+[^1]: Here is the body of the first footnote.
+
+[^2]: And of the second footnote.
+
+ This one has multiple paragraphs.
+
+[^3]:
+ Here is a footnote body that starts on next line.
+
+[^4]: quickie "that looks like a link ref if not careful"
+
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_letters.html b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_letters.html
new file mode 100644
index 0000000..3702606
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_letters.html
@@ -0,0 +1,23 @@
+<p>This is a para with a footnote.<sup class="footnote-ref" id="fnref-foo"><a href="#fn-foo">1</a></sup></p>
+
+<p>This is another para with a footnote<sup class="footnote-ref" id="fnref-hyphen-ated"><a href="#fn-hyphen-ated">2</a></sup> in it. Actually it has two<sup class="footnote-ref" id="fnref-Capital"><a href="#fn-Capital">3</a></sup> of
+them.</p>
+
+<div class="footnotes">
+<hr />
+<ol>
+<li id="fn-foo">
+<p>Here is the body of the first footnote.&nbsp;<a href="#fnref-foo" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">&#8617;</a></p>
+</li>
+
+<li id="fn-hyphen-ated">
+<p>And of the second footnote.</p>
+
+<p>This one has multiple paragraphs.&nbsp;<a href="#fnref-hyphen-ated" class="footnoteBackLink" title="Jump back to footnote 2 in the text.">&#8617;</a></p>
+</li>
+
+<li id="fn-Capital">
+<p>Here is a footnote body that starts on next line.&nbsp;<a href="#fnref-Capital" class="footnoteBackLink" title="Jump back to footnote 3 in the text.">&#8617;</a></p>
+</li>
+</ol>
+</div>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_letters.opts b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_letters.opts
new file mode 100644
index 0000000..9dfee9e
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_letters.opts
@@ -0,0 +1 @@
+{"extras": ["footnotes"]}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_letters.text b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_letters.text
new file mode 100644
index 0000000..431a96b
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_letters.text
@@ -0,0 +1,15 @@
+This is a para with a footnote.[^foo]
+
+This is another para with a footnote[^hyphen-ated] in it. Actually it has two[^Capital] of
+them.
+
+
+[^foo]: Here is the body of the first footnote.
+
+[^hyphen-ated]: And of the second footnote.
+
+ This one has multiple paragraphs.
+
+[^Capital]:
+ Here is a footnote body that starts on next line.
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_markup.html b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_markup.html
new file mode 100644
index 0000000..f365041
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_markup.html
@@ -0,0 +1,22 @@
+<p>This is a para with a footnote.<sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup></p>
+
+<p>This is another para with a footnote.<sup class="footnote-ref" id="fnref-2"><a href="#fn-2">2</a></sup></p>
+
+<div class="footnotes">
+<hr />
+<ol>
+<li id="fn-1">
+<p>And the <strong>body</strong> of the footnote has <code>markup</code>. For example,
+a <a href="http://digg.com">link to digg</a>. And some code:</p>
+
+<pre><code>print "Hello, World!"
+</code></pre>
+
+<p><a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">&#8617;</a></p>
+</li>
+
+<li id="fn-2">
+<p>This body has markup too, <em>but</em> doesn't end with a code block.&nbsp;<a href="#fnref-2" class="footnoteBackLink" title="Jump back to footnote 2 in the text.">&#8617;</a></p>
+</li>
+</ol>
+</div>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_markup.opts b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_markup.opts
new file mode 100644
index 0000000..9dfee9e
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_markup.opts
@@ -0,0 +1 @@
+{"extras": ["footnotes"]}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_markup.text b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_markup.text
new file mode 100644
index 0000000..07b5922
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_markup.text
@@ -0,0 +1,10 @@
+This is a para with a footnote.[^1]
+
+This is another para with a footnote.[^2]
+
+[^1]: And the **body** of the footnote has `markup`. For example,
+ a [link to digg](http://digg.com). And some code:
+
+ print "Hello, World!"
+
+[^2]: This body has markup too, *but* doesn't end with a code block.
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_safe_mode_escape.html b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_safe_mode_escape.html
new file mode 100644
index 0000000..6bce5a7
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_safe_mode_escape.html
@@ -0,0 +1,12 @@
+<p>This is a para with a footnote.<sup class="footnote-ref" id="fnref-1"><a href="#fn-1">1</a></sup></p>
+
+<div class="footnotes">
+<hr />
+<ol>
+<li id="fn-1">
+<p>Here is the &lt;em&gt;body&lt;/em&gt; of &lt;span class="yo"&gt;the&lt;/span&gt; footnote.</p>
+
+<p>&lt;div class="blah"&gt;And here is the second para of the footnote.&lt;/div&gt;&nbsp;<a href="#fnref-1" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">&#8617;</a></p>
+</li>
+</ol>
+</div>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_safe_mode_escape.opts b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_safe_mode_escape.opts
new file mode 100644
index 0000000..9d97404
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_safe_mode_escape.opts
@@ -0,0 +1 @@
+{"safe_mode": "escape", "extras": ["footnotes"]}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_safe_mode_escape.text b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_safe_mode_escape.text
new file mode 100644
index 0000000..ae8e4e7
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/footnotes_safe_mode_escape.text
@@ -0,0 +1,6 @@
+This is a para with a footnote.[^1]
+
+[^1]: Here is the <em>body</em> of <span class="yo">the</span> footnote.
+
+ <div class="blah">And here is the second para of the footnote.</div>
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/header.html b/t/docs-pythonmarkdown2-tm-cases-pass/header.html
new file mode 100644
index 0000000..90fc68a
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/header.html
@@ -0,0 +1,7 @@
+<h1>an h1</h1>
+
+<h2>an h2</h2>
+
+<h1>another h1</h1>
+
+<h2>another h2</h2>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/header.text b/t/docs-pythonmarkdown2-tm-cases-pass/header.text
new file mode 100644
index 0000000..b20ad13
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/header.text
@@ -0,0 +1,9 @@
+# an h1
+
+## an h2
+
+another h1
+==========
+
+another h2
+----------
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/hr.html b/t/docs-pythonmarkdown2-tm-cases-pass/hr.html
new file mode 100644
index 0000000..442117e
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/hr.html
@@ -0,0 +1,12 @@
+<p>Dashes:</p>
+
+<hr />
+
+<hr />
+
+<hr />
+
+<hr />
+
+<pre><code>---
+</code></pre>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/hr.text b/t/docs-pythonmarkdown2-tm-cases-pass/hr.text
new file mode 100644
index 0000000..765b735
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/hr.text
@@ -0,0 +1,12 @@
+Dashes:
+
+---
+
+ ---
+
+ ---
+
+ ---
+
+ ---
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/img_in_link.html b/t/docs-pythonmarkdown2-tm-cases-pass/img_in_link.html
new file mode 100644
index 0000000..09db27a
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/img_in_link.html
@@ -0,0 +1,4 @@
+<p>This example from
+<a href="http://orestis.gr/en/blog/2007/05/28/python-markdown-problems/">http://orestis.gr/en/blog/2007/05/28/python-markdown-problems/</a>:</p>
+
+<p><a href="http://www.google.com/" title="click to visit Google.com"><img src="http://www.google.com/images/logo.gif" alt="the google logo" /></a></p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/img_in_link.text b/t/docs-pythonmarkdown2-tm-cases-pass/img_in_link.text
new file mode 100644
index 0000000..98f6075
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/img_in_link.text
@@ -0,0 +1,7 @@
+This example from
+<http://orestis.gr/en/blog/2007/05/28/python-markdown-problems/>:
+
+[![the google logo][logo]][google]
+[logo]: http://www.google.com/images/logo.gif
+[google]: http://www.google.com/ "click to visit Google.com"
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/inline_links.html b/t/docs-pythonmarkdown2-tm-cases-pass/inline_links.html
new file mode 100644
index 0000000..ad2aa72
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/inline_links.html
@@ -0,0 +1,7 @@
+<p>an inline <a href="/url/">link</a></p>
+
+<p>a <a href="/url/" title="title">link "with" title</a></p>
+
+<p>an inline <img src="/url/" alt="image link" /></p>
+
+<p>an <img src="/url/" alt="image &quot;with&quot; title" title="title" /></p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/inline_links.text b/t/docs-pythonmarkdown2-tm-cases-pass/inline_links.text
new file mode 100644
index 0000000..444a997
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/inline_links.text
@@ -0,0 +1,7 @@
+an inline [link](/url/)
+
+a [link "with" title](/url/ "title")
+
+an inline ![image link](/url/)
+
+an ![image "with" title](/url/ "title")
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/issue2_safe_mode_borks_markup.html b/t/docs-pythonmarkdown2-tm-cases-pass/issue2_safe_mode_borks_markup.html
new file mode 100644
index 0000000..c36b6d9
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/issue2_safe_mode_borks_markup.html
@@ -0,0 +1,5 @@
+<h2>Heading 2</h2>
+
+<p>blah [HTML_REMOVED]alert('this should be removed')[HTML_REMOVED] <strong>blah</strong></p>
+
+<p>[HTML_REMOVED]alert('as should this')[HTML_REMOVED]</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/issue2_safe_mode_borks_markup.opts b/t/docs-pythonmarkdown2-tm-cases-pass/issue2_safe_mode_borks_markup.opts
new file mode 100644
index 0000000..fd31b4e
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/issue2_safe_mode_borks_markup.opts
@@ -0,0 +1 @@
+{"safe_mode": "replace"}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/issue2_safe_mode_borks_markup.text b/t/docs-pythonmarkdown2-tm-cases-pass/issue2_safe_mode_borks_markup.text
new file mode 100644
index 0000000..38cb2b5
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/issue2_safe_mode_borks_markup.text
@@ -0,0 +1,6 @@
+## Heading 2
+
+blah <script>alert('this should be removed')</script> **blah**
+
+<script>alert('as should this')</script>
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/link_defn_alt_title_delims.html b/t/docs-pythonmarkdown2-tm-cases-pass/link_defn_alt_title_delims.html
new file mode 100644
index 0000000..57871fb
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/link_defn_alt_title_delims.html
@@ -0,0 +1,3 @@
+<p>Alternative delimiters for <a href="http://daringfireball.net/projects/markdown/syntax#link" title="link syntax">link definitions</a> are allowed -- as of
+Markdown 1.0.2, I think. Hence, <a href="http://daringfireball.net/projects/markdown/syntax#link" title="link syntax">this link</a> and <a href="http://daringfireball.net/projects/markdown/syntax#link" title="link syntax">this link</a> work
+too.</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/link_defn_alt_title_delims.text b/t/docs-pythonmarkdown2-tm-cases-pass/link_defn_alt_title_delims.text
new file mode 100644
index 0000000..3d62b11
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/link_defn_alt_title_delims.text
@@ -0,0 +1,7 @@
+Alternative delimiters for [link definitions][link1] are allowed -- as of
+Markdown 1.0.2, I think. Hence, [this link][link2] and [this link][link3] work
+too.
+
+[link1]: http://daringfireball.net/projects/markdown/syntax#link "link syntax"
+[link2]: http://daringfireball.net/projects/markdown/syntax#link 'link syntax'
+[link3]: http://daringfireball.net/projects/markdown/syntax#link (link syntax)
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns.html b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns.html
new file mode 100644
index 0000000..6c98ea9
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns.html
@@ -0,0 +1 @@
+<p><a href="http://code.activestate.com/recipes/123/">Recipe 123</a> and <a href="http://bugs.activestate.com/show_bug.cgi?id=234">Komodo bug 234</a> are related.</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns.opts b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns.opts
new file mode 100644
index 0000000..bd85ea9
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns.opts
@@ -0,0 +1,7 @@
+{"extras": ["link-patterns"],
+ "link_patterns": [
+ (re.compile("recipe\s+(\d+)", re.I), r"http://code.activestate.com/recipes/\1/"),
+ (re.compile("(?:komodo\s+)?bug\s+(\d+)", re.I), r"http://bugs.activestate.com/show_bug.cgi?id=\1"),
+ ],
+}
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns.text b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns.text
new file mode 100644
index 0000000..d8a4081
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns.text
@@ -0,0 +1 @@
+Recipe 123 and Komodo bug 234 are related.
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_double_hit.html b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_double_hit.html
new file mode 100644
index 0000000..4402dcf
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_double_hit.html
@@ -0,0 +1 @@
+<p>There once was a <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=123">Mozilla bug 123</a> and a <a href="http://bugs.activestate.com/show_bug.cgi?id=123">Komodo bug 123</a>.</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_double_hit.opts b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_double_hit.opts
new file mode 100644
index 0000000..d64982d
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_double_hit.opts
@@ -0,0 +1,7 @@
+{"extras": ["link-patterns"],
+ "link_patterns": [
+ (re.compile(r'mozilla\s+bug\s+(\d+)', re.I), r'http://bugzilla.mozilla.org/show_bug.cgi?id=\1'),
+ (re.compile("(?:komodo\s+)?bug\s+(\d+)", re.I), r"http://bugs.activestate.com/show_bug.cgi?id=\1"),
+ ],
+}
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_double_hit.text b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_double_hit.text
new file mode 100644
index 0000000..29868b8
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_double_hit.text
@@ -0,0 +1 @@
+There once was a Mozilla bug 123 and a Komodo bug 123.
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_edge_cases.html b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_edge_cases.html
new file mode 100644
index 0000000..ffd0a72
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_edge_cases.html
@@ -0,0 +1 @@
+<p><a href="http://foo.com/blah_blah_blah/123">Blah 123</a> becomes a line with two underscores.</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_edge_cases.opts b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_edge_cases.opts
new file mode 100644
index 0000000..99ce0f7
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_edge_cases.opts
@@ -0,0 +1,6 @@
+{"extras": ["link-patterns"],
+ "link_patterns": [
+ (re.compile("Blah\s+(\d+)", re.I), r"http://foo.com/blah_blah_blah/\1"),
+ ],
+}
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_edge_cases.text b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_edge_cases.text
new file mode 100644
index 0000000..d1fb62c
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/link_patterns_edge_cases.text
@@ -0,0 +1 @@
+Blah 123 becomes a line with two underscores.
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/lists.html b/t/docs-pythonmarkdown2-tm-cases-pass/lists.html
new file mode 100644
index 0000000..f34c900
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/lists.html
@@ -0,0 +1,15 @@
+<p>count:</p>
+
+<ul>
+<li>one</li>
+<li>two</li>
+<li>three</li>
+</ul>
+
+<p>count in spanish:</p>
+
+<ol>
+<li>uno</li>
+<li>dos</li>
+<li>tres</li>
+</ol>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/lists.text b/t/docs-pythonmarkdown2-tm-cases-pass/lists.text
new file mode 100644
index 0000000..8d2b43c
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/lists.text
@@ -0,0 +1,11 @@
+count:
+
+* one
+* two
+* three
+
+count in spanish:
+
+1. uno
+2. dos
+3. tres
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/mismatched_footnotes.html b/t/docs-pythonmarkdown2-tm-cases-pass/mismatched_footnotes.html
new file mode 100644
index 0000000..7ac7bfd
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/mismatched_footnotes.html
@@ -0,0 +1,16 @@
+<p>This is sentence has a footnote foo<sup class="footnote-ref" id="fnref-foo"><a href="#fn-foo">1</a></sup> and whamo[^whamo].</p>
+
+<p>This is another para with a numbered footnote<sup class="footnote-ref" id="fnref-6"><a href="#fn-6">2</a></sup>.</p>
+
+<div class="footnotes">
+<hr />
+<ol>
+<li id="fn-foo">
+<p>Here is the body of the footnote foo.&nbsp;<a href="#fnref-foo" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">&#8617;</a></p>
+</li>
+
+<li id="fn-6">
+<p>Here is the body of the footnote 6.&nbsp;<a href="#fnref-6" class="footnoteBackLink" title="Jump back to footnote 2 in the text.">&#8617;</a></p>
+</li>
+</ol>
+</div>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/mismatched_footnotes.opts b/t/docs-pythonmarkdown2-tm-cases-pass/mismatched_footnotes.opts
new file mode 100644
index 0000000..9dfee9e
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/mismatched_footnotes.opts
@@ -0,0 +1 @@
+{"extras": ["footnotes"]}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/mismatched_footnotes.text b/t/docs-pythonmarkdown2-tm-cases-pass/mismatched_footnotes.text
new file mode 100644
index 0000000..d679192
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/mismatched_footnotes.text
@@ -0,0 +1,9 @@
+This is sentence has a footnote foo[^foo] and whamo[^whamo].
+
+This is another para with a numbered footnote[^6].
+
+
+[^foo]: Here is the body of the footnote foo.
+[^bar]: Here is the body of the footnote bar.
+[^6]: Here is the body of the footnote 6.
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/missing_link_defn.html b/t/docs-pythonmarkdown2-tm-cases-pass/missing_link_defn.html
new file mode 100644
index 0000000..2f8a9e8
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/missing_link_defn.html
@@ -0,0 +1 @@
+<p>This is a [missing link][missing] and a <a href="http://foo.com">used link</a>.</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/missing_link_defn.text b/t/docs-pythonmarkdown2-tm-cases-pass/missing_link_defn.text
new file mode 100644
index 0000000..817677f
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/missing_link_defn.text
@@ -0,0 +1,7 @@
+
+This is a [missing link][missing] and a [used link][used].
+
+
+[used]: http://foo.com
+[unused]: http://foo.com
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/nested_list.html b/t/docs-pythonmarkdown2-tm-cases-pass/nested_list.html
new file mode 100644
index 0000000..c0617e4
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/nested_list.html
@@ -0,0 +1,15 @@
+<p>shopping list:</p>
+
+<ul>
+<li>veggies
+<ul>
+<li>carrots</li>
+<li>lettuce</li>
+</ul></li>
+<li>fruits
+<ul>
+<li>oranges</li>
+<li>apples</li>
+<li><em>peaches</em></li>
+</ul></li>
+</ul>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/nested_list.text b/t/docs-pythonmarkdown2-tm-cases-pass/nested_list.text
new file mode 100644
index 0000000..a37a195
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/nested_list.text
@@ -0,0 +1,9 @@
+shopping list:
+
+- veggies
+ + carrots
+ + lettuce
+- fruits
+ + oranges
+ + apples
+ + *peaches*
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/nested_list_safe_mode.html b/t/docs-pythonmarkdown2-tm-cases-pass/nested_list_safe_mode.html
new file mode 100644
index 0000000..c0617e4
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/nested_list_safe_mode.html
@@ -0,0 +1,15 @@
+<p>shopping list:</p>
+
+<ul>
+<li>veggies
+<ul>
+<li>carrots</li>
+<li>lettuce</li>
+</ul></li>
+<li>fruits
+<ul>
+<li>oranges</li>
+<li>apples</li>
+<li><em>peaches</em></li>
+</ul></li>
+</ul>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/nested_list_safe_mode.opts b/t/docs-pythonmarkdown2-tm-cases-pass/nested_list_safe_mode.opts
new file mode 100644
index 0000000..ccb6a09
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/nested_list_safe_mode.opts
@@ -0,0 +1 @@
+{'safe_mode': True}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/nested_list_safe_mode.text b/t/docs-pythonmarkdown2-tm-cases-pass/nested_list_safe_mode.text
new file mode 100644
index 0000000..a37a195
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/nested_list_safe_mode.text
@@ -0,0 +1,9 @@
+shopping list:
+
+- veggies
+ + carrots
+ + lettuce
+- fruits
+ + oranges
+ + apples
+ + *peaches*
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/parens_in_url_4.html b/t/docs-pythonmarkdown2-tm-cases-pass/parens_in_url_4.html
new file mode 100644
index 0000000..6535e80
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/parens_in_url_4.html
@@ -0,0 +1 @@
+<p><a href="/url(test)" title="title">Inline link 4 with non-escaped parens</a>.</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/parens_in_url_4.text b/t/docs-pythonmarkdown2-tm-cases-pass/parens_in_url_4.text
new file mode 100644
index 0000000..5dfb9ab
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/parens_in_url_4.text
@@ -0,0 +1 @@
+[Inline link 4 with non-escaped parens](</url(test)> "title").
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/raw_html.html b/t/docs-pythonmarkdown2-tm-cases-pass/raw_html.html
new file mode 100644
index 0000000..ec135c6
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/raw_html.html
@@ -0,0 +1,5 @@
+<p>Hi, <span foo="*bar*"><em>there</em></span>. <!-- *blah* --> blah</p>
+
+<div>
+ **ack**
+</div>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/raw_html.text b/t/docs-pythonmarkdown2-tm-cases-pass/raw_html.text
new file mode 100644
index 0000000..13cde37
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/raw_html.text
@@ -0,0 +1,6 @@
+
+Hi, <span foo="*bar*">*there*</span>. <!-- *blah* --> blah
+
+<div>
+ **ack**
+</div>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/ref_links.html b/t/docs-pythonmarkdown2-tm-cases-pass/ref_links.html
new file mode 100644
index 0000000..406f8b5
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/ref_links.html
@@ -0,0 +1 @@
+<p><a href="http://www.google.com/">Google</a> is fast <img src="/img/star.png" alt="star" />.</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/ref_links.text b/t/docs-pythonmarkdown2-tm-cases-pass/ref_links.text
new file mode 100644
index 0000000..4df8c01
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/ref_links.text
@@ -0,0 +1,6 @@
+[Google][] is fast ![star][].
+
+[google]: http://www.google.com/
+[star]: /img/star.png
+
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/sublist-para.html b/t/docs-pythonmarkdown2-tm-cases-pass/sublist-para.html
new file mode 100644
index 0000000..a2f551b
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/sublist-para.html
@@ -0,0 +1,17 @@
+<p>Some quick thoughts from a coder's perspective:</p>
+
+<ul>
+<li><p>The source will be available in a Mercurial ...</p></li>
+<li><p>Komodo is a Mozilla-based application...</p>
+
+<ul>
+<li>Get a slightly tweaked mozilla build (C++, JavaScript, XUL).</li>
+<li>Get a slightly tweaks Python build (C).</li>
+<li>Add a bunch of core logic (Python)...</li>
+<li>Add Komodo chrome (XUL, JavaScript, CSS, DTDs).</li>
+</ul>
+
+<p><p>What this means is that work on and add significant functionality...</p></li>
+<li><p>Komodo uses the same extension mechanisms as Firefox...</p></li>
+<li><p>Komodo builds and runs on Windows, Linux and ...</p></li>
+</ul></p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/sublist-para.text b/t/docs-pythonmarkdown2-tm-cases-pass/sublist-para.text
new file mode 100644
index 0000000..7bf07ba
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/sublist-para.text
@@ -0,0 +1,17 @@
+Some quick thoughts from a coder's perspective:
+
+- The source will be available in a Mercurial ...
+
+- Komodo is a Mozilla-based application...
+
+ - Get a slightly tweaked mozilla build (C++, JavaScript, XUL).
+ - Get a slightly tweaks Python build (C).
+ - Add a bunch of core logic (Python)...
+ - Add Komodo chrome (XUL, JavaScript, CSS, DTDs).
+
+ What this means is that work on and add significant functionality...
+
+- Komodo uses the same extension mechanisms as Firefox...
+
+- Komodo builds and runs on Windows, Linux and ...
+
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/syntax_color.html b/t/docs-pythonmarkdown2-tm-cases-pass/syntax_color.html
new file mode 100644
index 0000000..2e172c1
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/syntax_color.html
@@ -0,0 +1,15 @@
+<p>Here is some sample code:</p>
+
+<div class="codehilite"><pre><code><span class="k">import</span> <span class="nn">sys</span>
+<span class="k">def</span> <span class="nf">main</span><span class="p">(</span><span class="n">argv</span><span class="o">=</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">):</span>
+ <span class="n">logging</span><span class="o">.</span><span class="n">basicConfig</span><span class="p">()</span>
+ <span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s">&#39;hi&#39;</span><span class="p">)</span>
+</code></pre></div>
+
+<p>and:</p>
+
+<div class="codehilite"><pre><code><span class="n">use</span> <span class="s1">&#39;zlib&#39;</span>
+<span class="nb">sub</span> <span class="n">main</span><span class="p">(</span><span class="n">argv</span><span class="p">)</span>
+ <span class="nb">puts</span> <span class="s1">&#39;hi&#39;</span>
+<span class="k">end</span>
+</code></pre></div>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/syntax_color.opts b/t/docs-pythonmarkdown2-tm-cases-pass/syntax_color.opts
new file mode 100644
index 0000000..95dfd41
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/syntax_color.opts
@@ -0,0 +1 @@
+{"extras": ["code-color"]}
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/syntax_color.text b/t/docs-pythonmarkdown2-tm-cases-pass/syntax_color.text
new file mode 100644
index 0000000..b4b30e5
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/syntax_color.text
@@ -0,0 +1,15 @@
+Here is some sample code:
+
+ :::python
+ import sys
+ def main(argv=sys.argv):
+ logging.basicConfig()
+ log.info('hi')
+
+and:
+
+ :::ruby
+ use 'zlib'
+ sub main(argv)
+ puts 'hi'
+ end
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/tricky_anchors.html b/t/docs-pythonmarkdown2-tm-cases-pass/tricky_anchors.html
new file mode 100644
index 0000000..0ec6204
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/tricky_anchors.html
@@ -0,0 +1,11 @@
+<p><a href="/url/">with [brackets][] in text</a></p>
+
+<p><a href="/url/" title="a title">with [[brackets][]] in text</a></p>
+
+<p><a href="/url/">full link [like](/this/) in text</a></p>
+
+<p><a href="/url/">full link to img <img src="/this/" alt="like" /> is ok</a></p>
+
+<p>[only open <a href="/url/" title="a title">bracket(/in/) text</a></p>
+
+<p><a href="/in/">only close bracket</a> text](/url/)</p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/tricky_anchors.text b/t/docs-pythonmarkdown2-tm-cases-pass/tricky_anchors.text
new file mode 100644
index 0000000..217f685
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/tricky_anchors.text
@@ -0,0 +1,11 @@
+[with [brackets][] in text](/url/)
+
+[with [[brackets][]] in text](/url/ "a title")
+
+[full link [like](/this/) in text](/url/)
+
+[full link to img ![like](/this/) is ok](/url/)
+
+[only open [bracket(/in/) text](/url/ 'a title')
+
+[only close bracket](/in/) text](/url/)
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/underline_in_autolink.html b/t/docs-pythonmarkdown2-tm-cases-pass/underline_in_autolink.html
new file mode 100644
index 0000000..9fef884
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/underline_in_autolink.html
@@ -0,0 +1,2 @@
+<p>Eric wrote up a (long) intro to writing UDL definitions a while back on
+his blog: <a href="http://blogs.activestate.com/ericp/2007/01/kid_adding_a_ne.html">http://blogs.activestate.com/ericp/2007/01/kid_adding_a_ne.html</a></p>
diff --git a/t/docs-pythonmarkdown2-tm-cases-pass/underline_in_autolink.text b/t/docs-pythonmarkdown2-tm-cases-pass/underline_in_autolink.text
new file mode 100644
index 0000000..58ae3e0
--- /dev/null
+++ b/t/docs-pythonmarkdown2-tm-cases-pass/underline_in_autolink.text
@@ -0,0 +1,2 @@
+Eric wrote up a (long) intro to writing UDL definitions a while back on
+his blog: <http://blogs.activestate.com/ericp/2007/01/kid_adding_a_ne.html>