aboutsummaryrefslogtreecommitdiffstats
path: root/tests2
diff options
context:
space:
mode:
authorArtem <artem@artem.(none)>2008-06-24 20:39:50 +0500
committerArtem <artem@artem.(none)>2008-06-24 20:39:50 +0500
commit2dbfcc0c510b46c9bfa288cb370b2d4f7fe7555d (patch)
tree3c4bc7c0532b98b42f6abfb53d92dd9ef57b0a7a /tests2
parenteede42cb87a74b1a91b360a218d05f9a5c703e55 (diff)
downloadmarkdown-2dbfcc0c510b46c9bfa288cb370b2d4f7fe7555d.tar.gz
markdown-2dbfcc0c510b46c9bfa288cb370b2d4f7fe7555d.tar.bz2
markdown-2dbfcc0c510b46c9bfa288cb370b2d4f7fe7555d.zip
second commit
Diffstat (limited to 'tests2')
-rw-r--r--tests2/formater.py55
-rw-r--r--tests2/php-markdown-cases-new/Backslash escapes.html14
-rw-r--r--tests2/php-markdown-cases-new/Backslash escapes.txt1
-rw-r--r--tests2/php-markdown-cases-new/Code Spans.html8
-rw-r--r--tests2/php-markdown-cases-new/Code Spans.txt6
-rw-r--r--tests2/php-markdown-cases-new/Code block in a list item.html11
-rw-r--r--tests2/php-markdown-cases-new/Code block in a list item.tags1
-rw-r--r--tests2/php-markdown-cases-new/Code block in a list item.txt8
-rw-r--r--tests2/php-markdown-cases-new/Email auto links.html5
-rw-r--r--tests2/php-markdown-cases-new/Email auto links.txt3
-rw-r--r--tests2/php-markdown-cases-new/Emphasis.html160
-rw-r--r--tests2/php-markdown-cases-new/Emphasis.tags1
-rw-r--r--tests2/php-markdown-cases-new/Emphasis.txt69
-rw-r--r--tests2/php-markdown-cases-new/Headers.html48
-rw-r--r--tests2/php-markdown-cases-new/Headers.txt9
-rw-r--r--tests2/php-markdown-cases-new/Images (Untitled).html8
-rw-r--r--tests2/php-markdown-cases-new/Images (Untitled).txt7
-rw-r--r--tests2/php-markdown-cases-new/Inline HTML (Simple).html17
-rw-r--r--tests2/php-markdown-cases-new/Inline HTML (Simple).tags1
-rw-r--r--tests2/php-markdown-cases-new/Inline HTML (Simple).txt15
-rw-r--r--tests2/php-markdown-cases-new/Inline HTML (Span).html5
-rw-r--r--tests2/php-markdown-cases-new/Inline HTML (Span).tags1
-rw-r--r--tests2/php-markdown-cases-new/Inline HTML (Span).txt4
-rw-r--r--tests2/php-markdown-cases-new/Inline HTML comments.html12
-rw-r--r--tests2/php-markdown-cases-new/Inline HTML comments.txt9
-rw-r--r--tests2/php-markdown-cases-new/Ins & del.html22
-rw-r--r--tests2/php-markdown-cases-new/Ins & del.html~24
-rw-r--r--tests2/php-markdown-cases-new/Ins & del.txt17
-rw-r--r--tests2/php-markdown-cases-new/Links, inline style.html2
-rw-r--r--tests2/php-markdown-cases-new/Links, inline style.txt1
-rw-r--r--tests2/php-markdown-cases-new/MD5 Hashes.html14
-rw-r--r--tests2/php-markdown-cases-new/MD5 Hashes.txt11
-rw-r--r--tests2/php-markdown-cases-new/Nesting.html17
-rw-r--r--tests2/php-markdown-cases-new/Nesting.tags1
-rw-r--r--tests2/php-markdown-cases-new/Nesting.txt11
-rw-r--r--tests2/php-markdown-cases-new/PHP-Specific Bugs.html20
-rw-r--r--tests2/php-markdown-cases-new/PHP-Specific Bugs.txt22
-rw-r--r--tests2/php-markdown-cases-new/Parens in URL.html16
-rw-r--r--tests2/php-markdown-cases-new/Parens in URL.tags1
-rw-r--r--tests2/php-markdown-cases-new/Parens in URL.txt14
-rw-r--r--tests2/php-markdown-cases-new/Tight blocks.html28
-rw-r--r--tests2/php-markdown-cases-new/Tight blocks.txt1
-rwxr-xr-xtests2/renamer15
-rw-r--r--tests2/tm-cases-new/auto_link.html5
-rw-r--r--tests2/tm-cases-new/auto_link.txt3
-rw-r--r--tests2/tm-cases-new/blockquote.html15
-rw-r--r--tests2/tm-cases-new/blockquote.txt5
-rw-r--r--tests2/tm-cases-new/blockquote_with_pre.html9
-rw-r--r--tests2/tm-cases-new/blockquote_with_pre.txt6
-rw-r--r--tests2/tm-cases-new/code_block_with_tabs.html5
-rw-r--r--tests2/tm-cases-new/code_block_with_tabs.tags1
-rw-r--r--tests2/tm-cases-new/code_block_with_tabs.txt3
-rw-r--r--tests2/tm-cases-new/codeblock.html7
-rw-r--r--tests2/tm-cases-new/codeblock.txt7
-rw-r--r--tests2/tm-cases-new/codespans.html3
-rw-r--r--tests2/tm-cases-new/codespans.txt2
-rw-r--r--tests2/tm-cases-new/codespans_safe_mode.html3
-rw-r--r--tests2/tm-cases-new/codespans_safe_mode.opts1
-rw-r--r--tests2/tm-cases-new/codespans_safe_mode.tags1
-rw-r--r--tests2/tm-cases-new/codespans_safe_mode.txt2
-rw-r--r--tests2/tm-cases-new/emphasis.html3
-rw-r--r--tests2/tm-cases-new/emphasis.txt2
-rw-r--r--tests2/tm-cases-new/escapes.html79
-rw-r--r--tests2/tm-cases-new/escapes.tags1
-rw-r--r--tests2/tm-cases-new/escapes.txt65
-rw-r--r--tests2/tm-cases-new/header.html7
-rw-r--r--tests2/tm-cases-new/header.txt9
-rw-r--r--tests2/tm-cases-new/hr.html13
-rw-r--r--tests2/tm-cases-new/hr.txt12
-rw-r--r--tests2/tm-cases-new/img_in_link.html6
-rw-r--r--tests2/tm-cases-new/img_in_link.txt7
-rw-r--r--tests2/tm-cases-new/inline_links.html11
-rw-r--r--tests2/tm-cases-new/inline_links.txt7
-rw-r--r--tests2/tm-cases-new/link_defn_alt_title_delims.html4
-rw-r--r--tests2/tm-cases-new/link_defn_alt_title_delims.txt7
-rw-r--r--tests2/tm-cases-new/lists.html29
-rw-r--r--tests2/tm-cases-new/lists.txt11
-rw-r--r--tests2/tm-cases-new/lists2.html35
-rw-r--r--tests2/tm-cases-new/lists2.tags1
-rw-r--r--tests2/tm-cases-new/lists2.txt14
-rw-r--r--tests2/tm-cases-new/missing_link_defn.html2
-rw-r--r--tests2/tm-cases-new/missing_link_defn.txt7
-rw-r--r--tests2/tm-cases-new/nested_list.html28
-rw-r--r--tests2/tm-cases-new/nested_list.txt9
-rw-r--r--tests2/tm-cases-new/parens_in_url_4.html2
-rw-r--r--tests2/tm-cases-new/parens_in_url_4.tags1
-rw-r--r--tests2/tm-cases-new/parens_in_url_4.txt1
-rw-r--r--tests2/tm-cases-new/raw_html.html6
-rw-r--r--tests2/tm-cases-new/raw_html.txt6
-rw-r--r--tests2/tm-cases-new/ref_links.html2
-rw-r--r--tests2/tm-cases-new/ref_links.txt6
-rw-r--r--tests2/tm-cases-new/sublist-para.html36
-rw-r--r--tests2/tm-cases-new/sublist-para.tags1
-rw-r--r--tests2/tm-cases-new/sublist-para.txt17
-rw-r--r--tests2/tm-cases-new/tricky_anchors.html17
-rw-r--r--tests2/tm-cases-new/tricky_anchors.txt11
-rw-r--r--tests2/tm-cases-new/underline_in_autolink.html3
-rw-r--r--tests2/tm-cases-new/underline_in_autolink.txt2
98 files changed, 1273 insertions, 0 deletions
diff --git a/tests2/formater.py b/tests2/formater.py
new file mode 100644
index 0000000..26d850f
--- /dev/null
+++ b/tests2/formater.py
@@ -0,0 +1,55 @@
+from __future__ import with_statement
+import os
+
+excl_tm_cases = """basic_safe_mode
+basic_safe_mode_escape
+auto_link_safe_mode
+code_safe_emphasis
+emacs_head_vars
+emacs_tail_vars
+footnotes
+footnotes_letters
+footnotes_markup
+footnotes_safe_mode_escape
+nested_list_safe_mode
+issue2_safe_mode_borks_markup
+issue3_bad_code_color_hack
+link_defn_spaces_in_url
+link_patterns
+link_patterns_double_hit
+link_patterns_edge_cases
+mismatched_footnotes
+nested_lists_safe_mode
+pyshell
+syntax_color"""
+
+
+def reformat(path, dest, ex=""):
+ excl = ex.split("\n")
+ for fname in os.listdir(path):
+ if fname.endswith(".html"):
+ if fname[:-5] in excl:
+ continue
+ res = processFile(path + fname)
+ with open(dest + fname, "w") as rfile:
+ rfile.write(res)
+
+def processFile(filePath):
+ with open(filePath) as f:
+ result = f.read()
+ result = result.replace("</pre>\n\n<p>", "</pre><p>")
+ result = result.replace("</pre>\n<", "</pre><")
+ result = result.replace("</li>", "\n</li>")
+ result = result.replace("<li>", "<li>\n")
+ result = result.replace(">\n<p>", "><p>")
+ result = result.replace("\" />", "\"/>")
+ result = result.replace("</p>\n", "\n</p>\n")
+
+ return result
+
+if __name__ == "__main__":
+ reformat("php-markdown-cases/", "php-markdown-cases-new/")
+ reformat("tm-cases/", "tm-cases-new/", excl_tm_cases)
+
+
+ \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/Backslash escapes.html b/tests2/php-markdown-cases-new/Backslash escapes.html
new file mode 100644
index 0000000..6d65ce1
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Backslash escapes.html
@@ -0,0 +1,14 @@
+<p>Tricky combinaisons:
+</p>
+
+<p>backslash with \-- two dashes
+</p>
+
+<p>backslash with \> greater than
+</p>
+
+<p>\[test](not a link)
+</p>
+
+<p>\*no emphasis*
+</p>
diff --git a/tests2/php-markdown-cases-new/Backslash escapes.txt b/tests2/php-markdown-cases-new/Backslash escapes.txt
new file mode 100644
index 0000000..a5e769b
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Backslash escapes.txt
@@ -0,0 +1 @@
+Tricky combinaisons: backslash with \\-- two dashes backslash with \\> greater than \\\[test](not a link) \\\*no emphasis* \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/Code Spans.html b/tests2/php-markdown-cases-new/Code Spans.html
new file mode 100644
index 0000000..a5a2ddc
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Code Spans.html
@@ -0,0 +1,8 @@
+<p>From <code>&lt;!--</code> to <code>--&gt;</code>
+on two lines.
+</p>
+
+<p>From <code>&lt;!--</code>
+to <code>--&gt;</code>
+on three lines.
+</p>
diff --git a/tests2/php-markdown-cases-new/Code Spans.txt b/tests2/php-markdown-cases-new/Code Spans.txt
new file mode 100644
index 0000000..43f2bcf
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Code Spans.txt
@@ -0,0 +1,6 @@
+From `<!--` to `-->`
+on two lines.
+
+From `<!--`
+to `-->`
+on three lines.
diff --git a/tests2/php-markdown-cases-new/Code block in a list item.html b/tests2/php-markdown-cases-new/Code block in a list item.html
new file mode 100644
index 0000000..ed86f62
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Code block in a list item.html
@@ -0,0 +1,11 @@
+<ul>
+<li><p>List Item:
+</p>
+
+<pre><code>code block
+
+with a blank line
+</code></pre><p>within a list item.
+</p>
+</li>
+</ul> \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/Code block in a list item.tags b/tests2/php-markdown-cases-new/Code block in a list item.tags
new file mode 100644
index 0000000..a3d2682
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Code block in a list item.tags
@@ -0,0 +1 @@
+knownfailure eol dontcare # fails just because of trailing EOL
diff --git a/tests2/php-markdown-cases-new/Code block in a list item.txt b/tests2/php-markdown-cases-new/Code block in a list item.txt
new file mode 100644
index 0000000..3fa24c3
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Code block in a list item.txt
@@ -0,0 +1,8 @@
+
+* List Item:
+
+ code block
+
+ with a blank line
+
+ within a list item. \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/Email auto links.html b/tests2/php-markdown-cases-new/Email auto links.html
new file mode 100644
index 0000000..36fb7e7
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Email auto links.html
@@ -0,0 +1,5 @@
+<p><a href="&#109;&#x61;&#105;&#x6c;&#116;&#x6f;&#58;&#x6d;&#105;&#x63;&#104;&#x65;&#108;&#x2e;&#102;&#x6f;&#114;&#x74;&#105;&#x6e;&#64;&#x6d;&#105;&#x63;&#104;&#x65;&#108;&#x66;&#46;&#x63;&#111;&#x6d;">&#x6d;&#105;&#x63;&#104;&#x65;&#108;&#x2e;&#102;&#x6f;&#114;&#x74;&#105;&#x6e;&#64;&#x6d;&#105;&#x63;&#104;&#x65;&#108;&#x66;&#46;&#x63;&#111;&#x6d;</a>
+</p>
+
+<p>International domain names: <a href="&#x6d;&#97;&#105;&#x6c;&#x74;&#111;&#58;&#x68;&#x65;&#108;&#112;&#x40;&#x74;ū&#x64;&#x61;&#108;&#105;ņ&#46;&#108;&#x76;">&#x68;&#x65;&#108;&#112;&#x40;&#x74;ū&#x64;&#x61;&#108;&#105;ņ&#46;&#108;&#x76;</a>
+</p>
diff --git a/tests2/php-markdown-cases-new/Email auto links.txt b/tests2/php-markdown-cases-new/Email auto links.txt
new file mode 100644
index 0000000..a8af4ec
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Email auto links.txt
@@ -0,0 +1,3 @@
+<michel.fortin@michelf.com>
+
+International domain names: <help@tūdaliņ.lv> \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/Emphasis.html b/tests2/php-markdown-cases-new/Emphasis.html
new file mode 100644
index 0000000..85a532d
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Emphasis.html
@@ -0,0 +1,160 @@
+<p>Combined emphasis:
+</p>
+
+<ol>
+<li>
+<strong><em>test test</em></strong>
+</li>
+<li>
+<strong><em>test test</em></strong>
+</li>
+<li>
+<em>test <strong>test</strong></em>
+</li>
+<li>
+<strong>test <em>test</em></strong>
+</li>
+<li>
+<strong><em>test</em> test</strong>
+</li>
+<li>
+<em><strong>test</strong> test</em>
+</li>
+<li>
+<strong><em>test</em> test</strong>
+</li>
+<li>
+<strong>test <em>test</em></strong>
+</li>
+<li>
+<em>test <strong>test</strong></em>
+</li>
+<li>
+<em>test <strong>test</strong></em>
+</li>
+<li>
+<strong>test <em>test</em></strong>
+</li>
+<li>
+<strong><em>test</em> test</strong>
+</li>
+<li>
+<em><strong>test</strong> test</em>
+</li>
+<li>
+<strong><em>test</em> test</strong>
+</li>
+<li>
+<strong>test <em>test</em></strong>
+</li>
+<li>
+<em>test <strong>test</strong></em>
+</li>
+</ol>
+
+<p>Incorrect nesting:
+</p>
+
+<ol>
+<li>
+*test <strong>test* test</strong>
+</li>
+<li>
+_test <strong>test_ test</strong>
+</li>
+<li>
+**test <em>test</em>* test*
+</li>
+<li>
+__test <em>test</em>_ test_
+</li>
+<li>
+<em>test *test</em> test*
+</li>
+<li>
+<em>test _test</em> test_
+</li>
+<li>
+<strong>test <strong>test</strong> test</strong>
+</li>
+<li>
+<strong>test <strong>test</strong> test</strong>
+</li>
+</ol>
+
+<p>No emphasis:
+</p>
+
+<ol>
+<li>
+test* test *test
+</li>
+<li>
+test** test **test
+</li>
+<li>
+test_ test _test
+</li>
+<li>
+test__ test __test
+</li>
+</ol>
+
+<p>Middle-word emphasis (asterisks):
+</p>
+
+<ol>
+<li>
+<em>a</em>b
+</li>
+<li>
+a<em>b</em>
+</li>
+<li>
+a<em>b</em>c
+</li>
+<li>
+<strong>a</strong>b
+</li>
+<li>
+a<strong>b</strong>
+</li>
+<li>
+a<strong>b</strong>c
+</li>
+</ol>
+
+<p>Middle-word emphasis (underscore):
+</p>
+
+<ol>
+<li>
+<em>a</em>b
+</li>
+<li>
+a<em>b</em>
+</li>
+<li>
+a<em>b</em>c
+</li>
+<li>
+<strong>a</strong>b
+</li>
+<li>
+a<strong>b</strong>
+</li>
+<li>
+a<strong>b</strong>c
+</li>
+</ol>
+
+<p>my<em>precious</em>file.txt
+</p>
+
+<h2>Tricky Cases</h2>
+
+<p>E**. <strong>Test</strong> TestTestTest
+</p>
+
+<p>E**. <strong>Test</strong> Test Test Test
+</p>
diff --git a/tests2/php-markdown-cases-new/Emphasis.tags b/tests2/php-markdown-cases-new/Emphasis.tags
new file mode 100644
index 0000000..06cb210
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Emphasis.tags
@@ -0,0 +1 @@
+knownfailure dontcare # need a re-write based on html5lib (or something) to fix
diff --git a/tests2/php-markdown-cases-new/Emphasis.txt b/tests2/php-markdown-cases-new/Emphasis.txt
new file mode 100644
index 0000000..ec48dec
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Emphasis.txt
@@ -0,0 +1,69 @@
+Combined emphasis:
+
+1. ***test test***
+2. ___test test___
+3. *test **test***
+4. **test *test***
+5. ***test* test**
+6. ***test** test*
+7. ***test* test**
+8. **test *test***
+9. *test **test***
+10. _test __test___
+11. __test _test___
+12. ___test_ test__
+13. ___test__ test_
+14. ___test_ test__
+15. __test _test___
+16. _test __test___
+
+
+Incorrect nesting:
+
+1. *test **test* test**
+2. _test __test_ test__
+3. **test *test** test*
+4. __test _test__ test_
+5. *test *test* test*
+6. _test _test_ test_
+7. **test **test** test**
+8. __test __test__ test__
+
+
+
+No emphasis:
+
+1. test* test *test
+2. test** test **test
+3. test_ test _test
+4. test__ test __test
+
+
+
+Middle-word emphasis (asterisks):
+
+1. *a*b
+2. a*b*
+3. a*b*c
+4. **a**b
+5. a**b**
+6. a**b**c
+
+
+Middle-word emphasis (underscore):
+
+1. _a_b
+2. a_b_
+3. a_b_c
+4. __a__b
+5. a__b__
+6. a__b__c
+
+my_precious_file.txt
+
+
+## Tricky Cases
+
+E**. **Test** TestTestTest
+
+E**. **Test** Test Test Test
diff --git a/tests2/php-markdown-cases-new/Headers.html b/tests2/php-markdown-cases-new/Headers.html
new file mode 100644
index 0000000..84628d3
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Headers.html
@@ -0,0 +1,48 @@
+<h1>Header</h1>
+
+<h2>Header</h2>
+
+<h3>Header</h3>
+
+<hr />
+
+<h1>Header</h1>
+
+<p>Paragraph
+</p>
+
+<h2>Header</h2>
+
+<p>Paragraph
+</p>
+
+<h3>Header</h3>
+
+<p>Paragraph
+</p>
+
+<hr />
+
+<p>Paragraph
+</p>
+
+<h1>Header</h1>
+
+<p>Paragraph
+</p>
+
+<p>Paragraph
+</p>
+
+<h2>Header</h2>
+
+<p>Paragraph
+</p>
+
+<p>Paragraph
+</p>
+
+<h3>Header</h3>
+
+<p>Paragraph
+</p>
diff --git a/tests2/php-markdown-cases-new/Headers.txt b/tests2/php-markdown-cases-new/Headers.txt
new file mode 100644
index 0000000..3a39174
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Headers.txt
@@ -0,0 +1,9 @@
+Header ====== Header ------ ### Header
+
+ - - -
+
+Header ====== Paragraph Header ------ Paragraph ### Header Paragraph
+
+ - - -
+
+Paragraph Header ====== Paragraph Paragraph Header ------ Paragraph Paragraph ### Header Paragraph \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/Images (Untitled).html b/tests2/php-markdown-cases-new/Images (Untitled).html
new file mode 100644
index 0000000..6ca4df1
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Images (Untitled).html
@@ -0,0 +1,8 @@
+<p><img src="/url/" alt="alt text"/>
+</p>
+
+<p><img src="/url/" alt="alt text"/>
+</p>
+
+<p><img src="/url/" alt="alt text"/>
+</p>
diff --git a/tests2/php-markdown-cases-new/Images (Untitled).txt b/tests2/php-markdown-cases-new/Images (Untitled).txt
new file mode 100644
index 0000000..cb481de
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Images (Untitled).txt
@@ -0,0 +1,7 @@
+![alt text](/url/)
+
+![alt text](</url/>)
+
+![alt text][foo]
+
+ [foo]: /url/ \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/Inline HTML (Simple).html b/tests2/php-markdown-cases-new/Inline HTML (Simple).html
new file mode 100644
index 0000000..2bb568d
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Inline HTML (Simple).html
@@ -0,0 +1,17 @@
+<p>With some attributes:
+</p>
+
+<div id="test">
+ foo
+</div>
+
+<div id="test"
+ class="nono">
+ foo
+</div>
+
+<p>Hr's:
+</p>
+
+<hr class="foo"
+ id="bar" > \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/Inline HTML (Simple).tags b/tests2/php-markdown-cases-new/Inline HTML (Simple).tags
new file mode 100644
index 0000000..a3d2682
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Inline HTML (Simple).tags
@@ -0,0 +1 @@
+knownfailure eol dontcare # fails just because of trailing EOL
diff --git a/tests2/php-markdown-cases-new/Inline HTML (Simple).txt b/tests2/php-markdown-cases-new/Inline HTML (Simple).txt
new file mode 100644
index 0000000..9177105
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Inline HTML (Simple).txt
@@ -0,0 +1,15 @@
+With some attributes:
+
+<div id="test">
+ foo
+</div>
+
+<div id="test"
+ class="nono">
+ foo
+</div>
+
+Hr's:
+
+<hr class="foo"
+ id="bar" >
diff --git a/tests2/php-markdown-cases-new/Inline HTML (Span).html b/tests2/php-markdown-cases-new/Inline HTML (Span).html
new file mode 100644
index 0000000..beddfe2
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Inline HTML (Span).html
@@ -0,0 +1,5 @@
+<p><abbr title="` **Attribute Content Is Not A Code Span** `">ACINACS</abbr>
+</p>
+
+<p><abbr title="`first backtick!">SB</abbr>
+<abbr title="`second backtick!">SB</abbr></p> \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/Inline HTML (Span).tags b/tests2/php-markdown-cases-new/Inline HTML (Span).tags
new file mode 100644
index 0000000..06cb210
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Inline HTML (Span).tags
@@ -0,0 +1 @@
+knownfailure dontcare # need a re-write based on html5lib (or something) to fix
diff --git a/tests2/php-markdown-cases-new/Inline HTML (Span).txt b/tests2/php-markdown-cases-new/Inline HTML (Span).txt
new file mode 100644
index 0000000..19028bb
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Inline HTML (Span).txt
@@ -0,0 +1,4 @@
+<abbr title="` **Attribute Content Is Not A Code Span** `">ACINACS</abbr>
+
+<abbr title="`first backtick!">SB</abbr>
+<abbr title="`second backtick!">SB</abbr> \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/Inline HTML comments.html b/tests2/php-markdown-cases-new/Inline HTML comments.html
new file mode 100644
index 0000000..877bcfb
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Inline HTML comments.html
@@ -0,0 +1,12 @@
+<p>Paragraph one.
+</p>
+
+<!-- double--dash (invalid SGML comment) -->
+
+<p>Paragraph two.
+</p>
+
+<!-- enclosed tag </div> -->
+
+<p>The end.
+</p>
diff --git a/tests2/php-markdown-cases-new/Inline HTML comments.txt b/tests2/php-markdown-cases-new/Inline HTML comments.txt
new file mode 100644
index 0000000..d57d00a
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Inline HTML comments.txt
@@ -0,0 +1,9 @@
+Paragraph one.
+
+<!-- double--dash (invalid SGML comment) -->
+
+Paragraph two.
+
+<!-- enclosed tag </div> -->
+
+The end.
diff --git a/tests2/php-markdown-cases-new/Ins & del.html b/tests2/php-markdown-cases-new/Ins & del.html
new file mode 100644
index 0000000..f5997a7
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Ins & del.html
@@ -0,0 +1,22 @@
+<p>Here is a block tag ins:
+</p>
+
+<ins>
+<p>Some text</p>
+</ins>
+
+<ins>And here it is inside a paragraph.</ins>
+
+
+<p>And here it is <ins>in the middle of</ins> a paragraph.
+</p>
+
+<del>
+<p>Some text</p>
+</del>
+
+<del>And here is ins as a paragraph.</del>
+
+
+<p>And here it is <del>in the middle of</del> a paragraph.
+</p>
diff --git a/tests2/php-markdown-cases-new/Ins & del.html~ b/tests2/php-markdown-cases-new/Ins & del.html~
new file mode 100644
index 0000000..82bfb2b
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Ins & del.html~
@@ -0,0 +1,24 @@
+<p>Here is a block tag ins:
+</p>
+
+<ins>
+<p>Some text
+</p>
+</ins>
+
+<ins>And here it is inside a paragraph.</ins>
+
+
+<p>And here it is <ins>in the middle of</ins> a paragraph.
+</p>
+
+<del>
+<p>Some text
+</p>
+</del>
+
+<del>And here is ins as a paragraph.</del>
+
+
+<p>And here it is <del>in the middle of</del> a paragraph.
+</p>
diff --git a/tests2/php-markdown-cases-new/Ins & del.txt b/tests2/php-markdown-cases-new/Ins & del.txt
new file mode 100644
index 0000000..2d54c66
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Ins & del.txt
@@ -0,0 +1,17 @@
+Here is a block tag ins:
+
+<ins>
+<p>Some text</p>
+</ins>
+
+<ins>And here it is inside a paragraph.</ins>
+
+And here it is <ins>in the middle of</ins> a paragraph.
+
+<del>
+<p>Some text</p>
+</del>
+
+<del>And here is ins as a paragraph.</del>
+
+And here it is <del>in the middle of</del> a paragraph.
diff --git a/tests2/php-markdown-cases-new/Links, inline style.html b/tests2/php-markdown-cases-new/Links, inline style.html
new file mode 100644
index 0000000..195cedf
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Links, inline style.html
@@ -0,0 +1,2 @@
+<p><a href="?}]*+|&amp;)">silly URL w/ angle brackets</a>.
+</p>
diff --git a/tests2/php-markdown-cases-new/Links, inline style.txt b/tests2/php-markdown-cases-new/Links, inline style.txt
new file mode 100644
index 0000000..600a044
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Links, inline style.txt
@@ -0,0 +1 @@
+[silly URL w/ angle brackets](<?}]*+|&)>).
diff --git a/tests2/php-markdown-cases-new/MD5 Hashes.html b/tests2/php-markdown-cases-new/MD5 Hashes.html
new file mode 100644
index 0000000..91283e0
--- /dev/null
+++ b/tests2/php-markdown-cases-new/MD5 Hashes.html
@@ -0,0 +1,14 @@
+<h1>Character Escapes</h1>
+
+<p>The MD5 value for <code>+</code> is "26b17225b626fb9238849fd60eabdf60".
+</p>
+
+<h1>HTML Blocks</h1>
+
+<p>test</p>
+
+<p>The MD5 value for <code>&lt;p&gt;test&lt;/p&gt;</code> is:
+</p>
+
+<p>6205333b793f34273d75379350b36826
+</p>
diff --git a/tests2/php-markdown-cases-new/MD5 Hashes.txt b/tests2/php-markdown-cases-new/MD5 Hashes.txt
new file mode 100644
index 0000000..7e03221
--- /dev/null
+++ b/tests2/php-markdown-cases-new/MD5 Hashes.txt
@@ -0,0 +1,11 @@
+# Character Escapes
+
+The MD5 value for `+` is "26b17225b626fb9238849fd60eabdf60".
+
+# HTML Blocks
+
+<p>test</p>
+
+The MD5 value for `<p>test</p>` is:
+
+6205333b793f34273d75379350b36826 \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/Nesting.html b/tests2/php-markdown-cases-new/Nesting.html
new file mode 100644
index 0000000..be47e21
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Nesting.html
@@ -0,0 +1,17 @@
+<p>Valid nesting:
+</p>
+
+<p><strong><a href="url">Link</a></strong>
+</p>
+
+<p><a href="url"><strong>Link</strong></a>
+</p>
+
+<p><strong><a href="url"><strong>Link</strong></a></strong>
+</p>
+
+<p>Invalid nesting:
+</p>
+
+<p><a href="url">[Link](url)</a>
+</p>
diff --git a/tests2/php-markdown-cases-new/Nesting.tags b/tests2/php-markdown-cases-new/Nesting.tags
new file mode 100644
index 0000000..cb77ed3
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Nesting.tags
@@ -0,0 +1 @@
+knownfailure dontcare
diff --git a/tests2/php-markdown-cases-new/Nesting.txt b/tests2/php-markdown-cases-new/Nesting.txt
new file mode 100644
index 0000000..791538c
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Nesting.txt
@@ -0,0 +1,11 @@
+Valid nesting:
+
+**[Link](url)**
+
+[**Link**](url)
+
+**[**Link**](url)**
+
+Invalid nesting:
+
+[[Link](url)](url) \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/PHP-Specific Bugs.html b/tests2/php-markdown-cases-new/PHP-Specific Bugs.html
new file mode 100644
index 0000000..19943dd
--- /dev/null
+++ b/tests2/php-markdown-cases-new/PHP-Specific Bugs.html
@@ -0,0 +1,20 @@
+<p>This tests for a bug where quotes escaped by PHP when using
+<code>preg_replace</code> with the <code>/e</code> modifier must be correctly unescaped
+(hence the <code>_UnslashQuotes</code> function found only in PHP Markdown).
+</p>
+
+<p>Headers below should appear exactly as they are typed (no backslash
+added or removed).
+</p>
+
+<h1>Header "quoted\" again \""</h1>
+
+<h2>Header "quoted\" again \""</h2>
+
+<h3>Header "quoted\" again \""</h3>
+
+<p>Test with tabs for <code>_Detab</code>:
+</p>
+
+<pre><code>Code 'block' with some "tabs" and "quotes"
+</code></pre>
diff --git a/tests2/php-markdown-cases-new/PHP-Specific Bugs.txt b/tests2/php-markdown-cases-new/PHP-Specific Bugs.txt
new file mode 100644
index 0000000..246b60d
--- /dev/null
+++ b/tests2/php-markdown-cases-new/PHP-Specific Bugs.txt
@@ -0,0 +1,22 @@
+This tests for a bug where quotes escaped by PHP when using
+`preg_replace` with the `/e` modifier must be correctly unescaped
+(hence the `_UnslashQuotes` function found only in PHP Markdown).
+
+
+
+Headers below should appear exactly as they are typed (no backslash
+added or removed).
+
+Header "quoted\" again \\""
+===========================
+
+Header "quoted\" again \\""
+---------------------------
+
+### Header "quoted\" again \\"" ###
+
+
+
+Test with tabs for `_Detab`:
+
+ Code 'block' with some "tabs" and "quotes"
diff --git a/tests2/php-markdown-cases-new/Parens in URL.html b/tests2/php-markdown-cases-new/Parens in URL.html
new file mode 100644
index 0000000..24254ff
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Parens in URL.html
@@ -0,0 +1,16 @@
+<p><a href="/url(test)" title="title">Inline link 1 with parens</a>.
+</p>
+
+<p><a href="/url(test)" title="title">Inline link 2 with parens</a>.
+</p>
+
+<p><a href="/url(test)" title="title">Inline link 3 with non-escaped parens</a>.
+</p>
+
+<p><a href="/url(test)" title="title">Inline link 4 with non-escaped parens</a>.
+</p>
+
+<p><a href="/url(test)" title="title">Reference link 1 with parens</a>.
+</p>
+
+<p><a href="/url(test)" title="title">Reference link 2 with parens</a>.</p> \ No newline at end of file
diff --git a/tests2/php-markdown-cases-new/Parens in URL.tags b/tests2/php-markdown-cases-new/Parens in URL.tags
new file mode 100644
index 0000000..918b7e8
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Parens in URL.tags
@@ -0,0 +1 @@
+dontcare knownfailure
diff --git a/tests2/php-markdown-cases-new/Parens in URL.txt b/tests2/php-markdown-cases-new/Parens in URL.txt
new file mode 100644
index 0000000..bb7be4f
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Parens in URL.txt
@@ -0,0 +1,14 @@
+[Inline link 1 with parens](/url\(test\) "title").
+
+[Inline link 2 with parens](</url\(test\)> "title").
+
+[Inline link 3 with non-escaped parens](/url(test) "title").
+
+[Inline link 4 with non-escaped parens](</url(test)> "title").
+
+[Reference link 1 with parens][1].
+
+[Reference link 2 with parens][2].
+
+ [1]: /url(test) "title"
+ [2]: </url(test)> "title"
diff --git a/tests2/php-markdown-cases-new/Tight blocks.html b/tests2/php-markdown-cases-new/Tight blocks.html
new file mode 100644
index 0000000..3d9342d
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Tight blocks.html
@@ -0,0 +1,28 @@
+<p>Paragraph and no space:
+* ciao
+</p>
+
+<p>Paragraph and 1 space:
+ * ciao
+</p>
+
+<p>Paragraph and 3 spaces:
+ * ciao
+</p>
+
+<p>Paragraph and 4 spaces:
+ * ciao
+</p>
+
+<p>Paragraph before header:
+</p>
+
+<h1>Header</h1>
+
+<p>Paragraph before blockquote:
+</p>
+
+<blockquote>
+ <p>Some quote.
+</p>
+</blockquote>
diff --git a/tests2/php-markdown-cases-new/Tight blocks.txt b/tests2/php-markdown-cases-new/Tight blocks.txt
new file mode 100644
index 0000000..ae4cdcb
--- /dev/null
+++ b/tests2/php-markdown-cases-new/Tight blocks.txt
@@ -0,0 +1 @@
+Paragraph and no space: * ciao Paragraph and 1 space: * ciao Paragraph and 3 spaces: * ciao Paragraph and 4 spaces: * ciao Paragraph before header: #Header Paragraph before blockquote: >Some quote. \ No newline at end of file
diff --git a/tests2/renamer b/tests2/renamer
new file mode 100755
index 0000000..24add6f
--- /dev/null
+++ b/tests2/renamer
@@ -0,0 +1,15 @@
+#!/bin/bash
+test_dirs=( "markdowntest-cases" "php-markdown-cases" "php-markdown-extra-cases" "tm-cases" )
+
+old_ext="text"
+new_ext="txt"
+
+for (( i = 0 ; i < "${#test_dirs[@]}"; i++ ))
+do
+ for j in "${test_dirs[$i]}"/*.${old_ext}
+ do
+ mv "$j" "${j/.text}".${new_ext}
+ done
+done
+
+
diff --git a/tests2/tm-cases-new/auto_link.html b/tests2/tm-cases-new/auto_link.html
new file mode 100644
index 0000000..8299181
--- /dev/null
+++ b/tests2/tm-cases-new/auto_link.html
@@ -0,0 +1,5 @@
+<p>I can has autolink? <a href="http://icanhascheeseburger.com">http://icanhascheeseburger.com</a>
+</p>
+<p>Ask garfield: <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#103;&#97;&#114;&#102;&#105;&#101;&#108;&#100;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;">&#103;&#97;&#114;&#102;&#105;&#101;&#108;&#100;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;</a>
+</p>
+
diff --git a/tests2/tm-cases-new/auto_link.txt b/tests2/tm-cases-new/auto_link.txt
new file mode 100644
index 0000000..e5354cd
--- /dev/null
+++ b/tests2/tm-cases-new/auto_link.txt
@@ -0,0 +1,3 @@
+I can has autolink? <http://icanhascheeseburger.com>
+
+Ask garfield: <garfield@example.com>
diff --git a/tests2/tm-cases-new/blockquote.html b/tests2/tm-cases-new/blockquote.html
new file mode 100644
index 0000000..7a35052
--- /dev/null
+++ b/tests2/tm-cases-new/blockquote.html
@@ -0,0 +1,15 @@
+<p>[Trent wrote]
+</p>
+
+<blockquote>
+ <p>no way
+</p>
+</blockquote>
+
+<p>[Jeff wrote]
+</p>
+
+<blockquote>
+ <p>way
+</p>
+</blockquote>
diff --git a/tests2/tm-cases-new/blockquote.txt b/tests2/tm-cases-new/blockquote.txt
new file mode 100644
index 0000000..3bcecaa
--- /dev/null
+++ b/tests2/tm-cases-new/blockquote.txt
@@ -0,0 +1,5 @@
+[Trent wrote]
+> no way
+
+[Jeff wrote]
+> way
diff --git a/tests2/tm-cases-new/blockquote_with_pre.html b/tests2/tm-cases-new/blockquote_with_pre.html
new file mode 100644
index 0000000..431c06a
--- /dev/null
+++ b/tests2/tm-cases-new/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/tests2/tm-cases-new/blockquote_with_pre.txt b/tests2/tm-cases-new/blockquote_with_pre.txt
new file mode 100644
index 0000000..e61b82f
--- /dev/null
+++ b/tests2/tm-cases-new/blockquote_with_pre.txt
@@ -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/tests2/tm-cases-new/code_block_with_tabs.html b/tests2/tm-cases-new/code_block_with_tabs.html
new file mode 100644
index 0000000..cc12d18
--- /dev/null
+++ b/tests2/tm-cases-new/code_block_with_tabs.html
@@ -0,0 +1,5 @@
+<p>Test with tabs for <code>_Detab</code>:
+</p>
+
+<pre><code>Code 'block' with some "tabs" and "quotes"
+</code></pre>
diff --git a/tests2/tm-cases-new/code_block_with_tabs.tags b/tests2/tm-cases-new/code_block_with_tabs.tags
new file mode 100644
index 0000000..981bc5a
--- /dev/null
+++ b/tests2/tm-cases-new/code_block_with_tabs.tags
@@ -0,0 +1 @@
+fromphpmarkdown # from PHP Markdown test "Parens in URL.text"
diff --git a/tests2/tm-cases-new/code_block_with_tabs.txt b/tests2/tm-cases-new/code_block_with_tabs.txt
new file mode 100644
index 0000000..bcf94c4
--- /dev/null
+++ b/tests2/tm-cases-new/code_block_with_tabs.txt
@@ -0,0 +1,3 @@
+Test with tabs for `_Detab`:
+
+ Code 'block' with some "tabs" and "quotes"
diff --git a/tests2/tm-cases-new/codeblock.html b/tests2/tm-cases-new/codeblock.html
new file mode 100644
index 0000000..f9e04d0
--- /dev/null
+++ b/tests2/tm-cases-new/codeblock.html
@@ -0,0 +1,7 @@
+<pre><code>some code
+</code></pre><p>some 'splaining
+</p>
+
+<pre><code>some more code
+2 &gt; 1
+</code></pre>
diff --git a/tests2/tm-cases-new/codeblock.txt b/tests2/tm-cases-new/codeblock.txt
new file mode 100644
index 0000000..d374216
--- /dev/null
+++ b/tests2/tm-cases-new/codeblock.txt
@@ -0,0 +1,7 @@
+ some code
+
+some 'splaining
+
+ some more code
+ 2 > 1
+
diff --git a/tests2/tm-cases-new/codespans.html b/tests2/tm-cases-new/codespans.html
new file mode 100644
index 0000000..b9994a1
--- /dev/null
+++ b/tests2/tm-cases-new/codespans.html
@@ -0,0 +1,3 @@
+<p><code>This</code> is a code span.
+And <code>This is one with an `embedded backtick`</code>.
+</p>
diff --git a/tests2/tm-cases-new/codespans.txt b/tests2/tm-cases-new/codespans.txt
new file mode 100644
index 0000000..67015a9
--- /dev/null
+++ b/tests2/tm-cases-new/codespans.txt
@@ -0,0 +1,2 @@
+`This` is a code span.
+And ``This is one with an `embedded backtick` ``.
diff --git a/tests2/tm-cases-new/codespans_safe_mode.html b/tests2/tm-cases-new/codespans_safe_mode.html
new file mode 100644
index 0000000..b9994a1
--- /dev/null
+++ b/tests2/tm-cases-new/codespans_safe_mode.html
@@ -0,0 +1,3 @@
+<p><code>This</code> is a code span.
+And <code>This is one with an `embedded backtick`</code>.
+</p>
diff --git a/tests2/tm-cases-new/codespans_safe_mode.opts b/tests2/tm-cases-new/codespans_safe_mode.opts
new file mode 100644
index 0000000..ccb6a09
--- /dev/null
+++ b/tests2/tm-cases-new/codespans_safe_mode.opts
@@ -0,0 +1 @@
+{'safe_mode': True}
diff --git a/tests2/tm-cases-new/codespans_safe_mode.tags b/tests2/tm-cases-new/codespans_safe_mode.tags
new file mode 100644
index 0000000..dcc8b6c
--- /dev/null
+++ b/tests2/tm-cases-new/codespans_safe_mode.tags
@@ -0,0 +1 @@
+issue9 safe_mode
diff --git a/tests2/tm-cases-new/codespans_safe_mode.txt b/tests2/tm-cases-new/codespans_safe_mode.txt
new file mode 100644
index 0000000..67015a9
--- /dev/null
+++ b/tests2/tm-cases-new/codespans_safe_mode.txt
@@ -0,0 +1,2 @@
+`This` is a code span.
+And ``This is one with an `embedded backtick` ``.
diff --git a/tests2/tm-cases-new/emphasis.html b/tests2/tm-cases-new/emphasis.html
new file mode 100644
index 0000000..08ea3d9
--- /dev/null
+++ b/tests2/tm-cases-new/emphasis.html
@@ -0,0 +1,3 @@
+<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/tests2/tm-cases-new/emphasis.txt b/tests2/tm-cases-new/emphasis.txt
new file mode 100644
index 0000000..99c324e
--- /dev/null
+++ b/tests2/tm-cases-new/emphasis.txt
@@ -0,0 +1,2 @@
+This is *italic* and this is **bold**.
+This is also _italic_ and this is __bold__.
diff --git a/tests2/tm-cases-new/escapes.html b/tests2/tm-cases-new/escapes.html
new file mode 100644
index 0000000..bcf6f3c
--- /dev/null
+++ b/tests2/tm-cases-new/escapes.html
@@ -0,0 +1,79 @@
+<h1>Backslash-escapes: basics</h1>
+
+<p>**don't shout**
+</p>
+
+<p>*don't emphasize*
+</p>
+
+<p>_literal underscores_
+</p>
+
+<p>__more literal underscores__
+</p>
+
+<h2>This header has trailing hash marks ##</h2>
+
+<h1>Backslash-escapes: links</h1>
+
+<p>This is not a [link](/url/).
+</p>
+
+<p>This is a link, not an image link: !<a href="/url/">link</a>.
+</p>
+
+<p>Should this be an <a href="http://autolink\">http://autolink\</a> or not?
+I'll ask on markdown-discuss.
+I suspect PHP markdown is considering this NOT an autolink.
+</p>
+
+<p>This is not a [link definition][link1] but <a href="/url/">this is</a>.
+</p>
+
+<h1>Backslash-escapse: code blocks</h1>
+
+<p>In a code block:
+</p>
+
+<pre><code>escapes should \*not\* be \_interpreted\_
+even \`backticks\`
+</code></pre>
+
+<h1>Backslash-escapse: code spans</h1>
+
+<p>Getting backticks and backslash-escapes working correctly with
+code spans can be tricky:
+</p>
+
+<p><code>a normal code span</code>
+</p>
+
+<p><code>need multiple backticks to include a literal ` backtick</code>
+</p>
+
+<p><code>`use a leading space to start a code span with a backtick</code>
+</p>
+
+<p><code>use a trailing space to end a code span with a backtick`</code>
+</p>
+
+<p><code>backslash-escapes \(are\) \*not\* \`interpreted\` in a code span</code>
+</p>
+
+<p>`<code>a code span prefixed with a literal backtick</code>
+</p>
+
+<p>`not a code span`
+</p>
+
+<p><em>Note A</em>: The <code>(?!`)</code> after the <code>\1</code> group in the
+<code>_DoCodeSpans()/_do_code_spans()</code> regex is necessary to ensure that a backtick
+doesn't match at the start of the code block (group <code>\2</code>) in an example like
+this:
+</p>
+
+<ul>
+<li>
+`<code>foo</code>
+</li>
+</ul>
diff --git a/tests2/tm-cases-new/escapes.tags b/tests2/tm-cases-new/escapes.tags
new file mode 100644
index 0000000..0184518
--- /dev/null
+++ b/tests2/tm-cases-new/escapes.tags
@@ -0,0 +1 @@
+issue15
diff --git a/tests2/tm-cases-new/escapes.txt b/tests2/tm-cases-new/escapes.txt
new file mode 100644
index 0000000..dbfc2b5
--- /dev/null
+++ b/tests2/tm-cases-new/escapes.txt
@@ -0,0 +1,65 @@
+# Backslash-escapes: basics
+
+\*\*don't shout\*\*
+
+\*don't emphasize\*
+
+\_literal underscores\_
+
+\_\_more literal underscores\_\_
+
+## This header has trailing hash marks \#\#
+
+
+# Backslash-escapes: links
+
+This is not a \[link](/url/).
+
+This is a link, not an image link: \![link](/url/).
+
+Should this be an <http://autolink\> or not?
+I'll ask on markdown-discuss.
+I suspect PHP markdown is considering this NOT an autolink.
+
+This is not a [link definition\][link1] but [this is][link1].
+
+[link1]: /url/
+
+
+# Backslash-escapse: code blocks
+
+In a code block:
+
+ escapes should \*not\* be \_interpreted\_
+ even \`backticks\`
+
+
+# Backslash-escapse: code spans
+
+Getting backticks and backslash-escapes working correctly with
+code spans can be tricky:
+
+`a normal code span`
+
+``need multiple backticks to include a literal ` backtick``
+
+`` `use a leading space to start a code span with a backtick``
+
+``use a trailing space to end a code span with a backtick` ``
+
+``backslash-escapes \(are\) \*not\* \`interpreted\` in a code span``
+
+\``a code span prefixed with a literal backtick`
+
+\`not a code span\`
+
+
+*Note A*: The `` (?!`) `` after the `\1` group in the
+`_DoCodeSpans()/_do_code_spans()` regex is necessary to ensure that a backtick
+doesn't match at the start of the code block (group `\2`) in an example like
+this:
+
+- ``foo`
+
+
+
diff --git a/tests2/tm-cases-new/header.html b/tests2/tm-cases-new/header.html
new file mode 100644
index 0000000..90fc68a
--- /dev/null
+++ b/tests2/tm-cases-new/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/tests2/tm-cases-new/header.txt b/tests2/tm-cases-new/header.txt
new file mode 100644
index 0000000..b20ad13
--- /dev/null
+++ b/tests2/tm-cases-new/header.txt
@@ -0,0 +1,9 @@
+# an h1
+
+## an h2
+
+another h1
+==========
+
+another h2
+----------
diff --git a/tests2/tm-cases-new/hr.html b/tests2/tm-cases-new/hr.html
new file mode 100644
index 0000000..83c3ac2
--- /dev/null
+++ b/tests2/tm-cases-new/hr.html
@@ -0,0 +1,13 @@
+<p>Dashes:
+</p>
+
+<hr />
+
+<hr />
+
+<hr />
+
+<hr />
+
+<pre><code>---
+</code></pre>
diff --git a/tests2/tm-cases-new/hr.txt b/tests2/tm-cases-new/hr.txt
new file mode 100644
index 0000000..765b735
--- /dev/null
+++ b/tests2/tm-cases-new/hr.txt
@@ -0,0 +1,12 @@
+Dashes:
+
+---
+
+ ---
+
+ ---
+
+ ---
+
+ ---
+
diff --git a/tests2/tm-cases-new/img_in_link.html b/tests2/tm-cases-new/img_in_link.html
new file mode 100644
index 0000000..b51d5d6
--- /dev/null
+++ b/tests2/tm-cases-new/img_in_link.html
@@ -0,0 +1,6 @@
+<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/tests2/tm-cases-new/img_in_link.txt b/tests2/tm-cases-new/img_in_link.txt
new file mode 100644
index 0000000..98f6075
--- /dev/null
+++ b/tests2/tm-cases-new/img_in_link.txt
@@ -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/tests2/tm-cases-new/inline_links.html b/tests2/tm-cases-new/inline_links.html
new file mode 100644
index 0000000..8c5a4fb
--- /dev/null
+++ b/tests2/tm-cases-new/inline_links.html
@@ -0,0 +1,11 @@
+<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/" title="title" alt="image &quot;with&quot; title"/>
+</p>
diff --git a/tests2/tm-cases-new/inline_links.txt b/tests2/tm-cases-new/inline_links.txt
new file mode 100644
index 0000000..444a997
--- /dev/null
+++ b/tests2/tm-cases-new/inline_links.txt
@@ -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/tests2/tm-cases-new/link_defn_alt_title_delims.html b/tests2/tm-cases-new/link_defn_alt_title_delims.html
new file mode 100644
index 0000000..0ff3742
--- /dev/null
+++ b/tests2/tm-cases-new/link_defn_alt_title_delims.html
@@ -0,0 +1,4 @@
+<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/tests2/tm-cases-new/link_defn_alt_title_delims.txt b/tests2/tm-cases-new/link_defn_alt_title_delims.txt
new file mode 100644
index 0000000..3d62b11
--- /dev/null
+++ b/tests2/tm-cases-new/link_defn_alt_title_delims.txt
@@ -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/tests2/tm-cases-new/lists.html b/tests2/tm-cases-new/lists.html
new file mode 100644
index 0000000..5d7ec15
--- /dev/null
+++ b/tests2/tm-cases-new/lists.html
@@ -0,0 +1,29 @@
+<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/tests2/tm-cases-new/lists.txt b/tests2/tm-cases-new/lists.txt
new file mode 100644
index 0000000..8d2b43c
--- /dev/null
+++ b/tests2/tm-cases-new/lists.txt
@@ -0,0 +1,11 @@
+count:
+
+* one
+* two
+* three
+
+count in spanish:
+
+1. uno
+2. dos
+3. tres
diff --git a/tests2/tm-cases-new/lists2.html b/tests2/tm-cases-new/lists2.html
new file mode 100644
index 0000000..d0e20c8
--- /dev/null
+++ b/tests2/tm-cases-new/lists2.html
@@ -0,0 +1,35 @@
+<p>mixed bullets:
+</p>
+
+<ul>
+<li>
+a
+</li>
+<li>
+b
+</li>
+<li>
+c
+</li>
+</ul>
+
+<p>ul followed by ol:
+</p>
+
+<ul>
+<li>
+a
+</li>
+<li>
+b
+</li>
+</ul>
+
+<ol>
+<li>
+1
+</li>
+<li>
+2
+</li>
+</ol>
diff --git a/tests2/tm-cases-new/lists2.tags b/tests2/tm-cases-new/lists2.tags
new file mode 100644
index 0000000..e6b969b
--- /dev/null
+++ b/tests2/tm-cases-new/lists2.tags
@@ -0,0 +1 @@
+issue16
diff --git a/tests2/tm-cases-new/lists2.txt b/tests2/tm-cases-new/lists2.txt
new file mode 100644
index 0000000..54123d1
--- /dev/null
+++ b/tests2/tm-cases-new/lists2.txt
@@ -0,0 +1,14 @@
+mixed bullets:
+
+* a
+- b
++ c
+
+
+ul followed by ol:
+
+- a
+- b
+
+1. 1
+2. 2
diff --git a/tests2/tm-cases-new/missing_link_defn.html b/tests2/tm-cases-new/missing_link_defn.html
new file mode 100644
index 0000000..bafd445
--- /dev/null
+++ b/tests2/tm-cases-new/missing_link_defn.html
@@ -0,0 +1,2 @@
+<p>This is a [missing link][missing] and a <a href="http://foo.com">used link</a>.
+</p>
diff --git a/tests2/tm-cases-new/missing_link_defn.txt b/tests2/tm-cases-new/missing_link_defn.txt
new file mode 100644
index 0000000..817677f
--- /dev/null
+++ b/tests2/tm-cases-new/missing_link_defn.txt
@@ -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/tests2/tm-cases-new/nested_list.html b/tests2/tm-cases-new/nested_list.html
new file mode 100644
index 0000000..d370acd
--- /dev/null
+++ b/tests2/tm-cases-new/nested_list.html
@@ -0,0 +1,28 @@
+<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/tests2/tm-cases-new/nested_list.txt b/tests2/tm-cases-new/nested_list.txt
new file mode 100644
index 0000000..a37a195
--- /dev/null
+++ b/tests2/tm-cases-new/nested_list.txt
@@ -0,0 +1,9 @@
+shopping list:
+
+- veggies
+ + carrots
+ + lettuce
+- fruits
+ + oranges
+ + apples
+ + *peaches*
diff --git a/tests2/tm-cases-new/parens_in_url_4.html b/tests2/tm-cases-new/parens_in_url_4.html
new file mode 100644
index 0000000..edccf0d
--- /dev/null
+++ b/tests2/tm-cases-new/parens_in_url_4.html
@@ -0,0 +1,2 @@
+<p><a href="/url(test)" title="title">Inline link 4 with non-escaped parens</a>.
+</p>
diff --git a/tests2/tm-cases-new/parens_in_url_4.tags b/tests2/tm-cases-new/parens_in_url_4.tags
new file mode 100644
index 0000000..981bc5a
--- /dev/null
+++ b/tests2/tm-cases-new/parens_in_url_4.tags
@@ -0,0 +1 @@
+fromphpmarkdown # from PHP Markdown test "Parens in URL.text"
diff --git a/tests2/tm-cases-new/parens_in_url_4.txt b/tests2/tm-cases-new/parens_in_url_4.txt
new file mode 100644
index 0000000..5dfb9ab
--- /dev/null
+++ b/tests2/tm-cases-new/parens_in_url_4.txt
@@ -0,0 +1 @@
+[Inline link 4 with non-escaped parens](</url(test)> "title").
diff --git a/tests2/tm-cases-new/raw_html.html b/tests2/tm-cases-new/raw_html.html
new file mode 100644
index 0000000..2ae6fe9
--- /dev/null
+++ b/tests2/tm-cases-new/raw_html.html
@@ -0,0 +1,6 @@
+<p>Hi, <span foo="*bar*"><em>there</em></span>. <!-- *blah* --> blah
+</p>
+
+<div>
+ **ack**
+</div>
diff --git a/tests2/tm-cases-new/raw_html.txt b/tests2/tm-cases-new/raw_html.txt
new file mode 100644
index 0000000..13cde37
--- /dev/null
+++ b/tests2/tm-cases-new/raw_html.txt
@@ -0,0 +1,6 @@
+
+Hi, <span foo="*bar*">*there*</span>. <!-- *blah* --> blah
+
+<div>
+ **ack**
+</div>
diff --git a/tests2/tm-cases-new/ref_links.html b/tests2/tm-cases-new/ref_links.html
new file mode 100644
index 0000000..7fb1582
--- /dev/null
+++ b/tests2/tm-cases-new/ref_links.html
@@ -0,0 +1,2 @@
+<p><a href="http://www.google.com/">Google</a> is fast <img src="/img/star.png" alt="star"/>.
+</p>
diff --git a/tests2/tm-cases-new/ref_links.txt b/tests2/tm-cases-new/ref_links.txt
new file mode 100644
index 0000000..4df8c01
--- /dev/null
+++ b/tests2/tm-cases-new/ref_links.txt
@@ -0,0 +1,6 @@
+[Google][] is fast ![star][].
+
+[google]: http://www.google.com/
+[star]: /img/star.png
+
+
diff --git a/tests2/tm-cases-new/sublist-para.html b/tests2/tm-cases-new/sublist-para.html
new file mode 100644
index 0000000..f1d47bf
--- /dev/null
+++ b/tests2/tm-cases-new/sublist-para.html
@@ -0,0 +1,36 @@
+<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/tests2/tm-cases-new/sublist-para.tags b/tests2/tm-cases-new/sublist-para.tags
new file mode 100644
index 0000000..81b35c7
--- /dev/null
+++ b/tests2/tm-cases-new/sublist-para.tags
@@ -0,0 +1 @@
+questionable # <p><p> isn't really correct, but Markdown.pl does the same
diff --git a/tests2/tm-cases-new/sublist-para.txt b/tests2/tm-cases-new/sublist-para.txt
new file mode 100644
index 0000000..7bf07ba
--- /dev/null
+++ b/tests2/tm-cases-new/sublist-para.txt
@@ -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/tests2/tm-cases-new/tricky_anchors.html b/tests2/tm-cases-new/tricky_anchors.html
new file mode 100644
index 0000000..af40218
--- /dev/null
+++ b/tests2/tm-cases-new/tricky_anchors.html
@@ -0,0 +1,17 @@
+<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/tests2/tm-cases-new/tricky_anchors.txt b/tests2/tm-cases-new/tricky_anchors.txt
new file mode 100644
index 0000000..217f685
--- /dev/null
+++ b/tests2/tm-cases-new/tricky_anchors.txt
@@ -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/tests2/tm-cases-new/underline_in_autolink.html b/tests2/tm-cases-new/underline_in_autolink.html
new file mode 100644
index 0000000..f5f21eb
--- /dev/null
+++ b/tests2/tm-cases-new/underline_in_autolink.html
@@ -0,0 +1,3 @@
+<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/tests2/tm-cases-new/underline_in_autolink.txt b/tests2/tm-cases-new/underline_in_autolink.txt
new file mode 100644
index 0000000..58ae3e0
--- /dev/null
+++ b/tests2/tm-cases-new/underline_in_autolink.txt
@@ -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>