aboutsummaryrefslogtreecommitdiffstats
path: root/tests/misc
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2014-09-25 16:07:07 -0400
committerWaylan Limberg <waylan.limberg@icloud.com>2014-09-26 10:29:48 -0400
commit8358bb3c569026d9775859bcdbd2611fc9499420 (patch)
treeebc59beddea170c21df1d8ccfc889120599a11ab /tests/misc
parent9082ed45deef99a0ff3c20aaa9f2c9b63e576838 (diff)
downloadmarkdown-8358bb3c569026d9775859bcdbd2611fc9499420.tar.gz
markdown-8358bb3c569026d9775859bcdbd2611fc9499420.tar.bz2
markdown-8358bb3c569026d9775859bcdbd2611fc9499420.zip
Better nested STRONG EM support.
Fixes #253. Thanks to @facelessuser for the tests. Although I removed a bunch of weird ones (even some that passed) from his PR (#342). For the most part, there is no definitive way for those to be parsed. So there is no point of testing for them. In most of those situations, authors should be mixing underscores and astericks so it is clear what is intended.
Diffstat (limited to 'tests/misc')
-rw-r--r--tests/misc/em_strong_complex.html14
-rw-r--r--tests/misc/em_strong_complex.txt27
2 files changed, 41 insertions, 0 deletions
diff --git a/tests/misc/em_strong_complex.html b/tests/misc/em_strong_complex.html
new file mode 100644
index 0000000..3befa70
--- /dev/null
+++ b/tests/misc/em_strong_complex.html
@@ -0,0 +1,14 @@
+<p><em><strong>test test</strong> test test</em></p>
+<p><strong><em>test test</em> test test</strong></p>
+<p><strong><em>test</em></strong></p>
+<p><strong>test</strong>_</p>
+<p><strong><em>test</em> test</strong>_</p>
+<p><strong><em>test</em> test</strong></p>
+<p><em>test_test test_test</em></p>
+<p><em><strong>test test</strong> test test</em></p>
+<p><strong><em>test test</em> test test</strong></p>
+<p>*<em>test</em></p>
+<p><strong><em>test</em></strong></p>
+<p><strong>test</strong>*</p>
+<p><strong><em>test</em> test</strong></p>
+<p><em>test</em>test test<em>test</em></p> \ No newline at end of file
diff --git a/tests/misc/em_strong_complex.txt b/tests/misc/em_strong_complex.txt
new file mode 100644
index 0000000..66f4ff1
--- /dev/null
+++ b/tests/misc/em_strong_complex.txt
@@ -0,0 +1,27 @@
+___test test__ test test_
+
+___test test_ test test__
+
+___test___
+
+__test___
+
+___test_ test___
+
+___test_ test__
+
+_test_test test_test_
+
+***test test** test test*
+
+***test test* test test**
+
+**test*
+
+***test***
+
+**test***
+
+***test* test**
+
+*test*test test*test* \ No newline at end of file