diff options
author | Waylan Limberg <waylan@gmail.com> | 2009-03-30 22:48:25 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2009-03-30 22:48:25 -0400 |
commit | 6d972b91d30d6e314fee111354b98ed4130eebe6 (patch) | |
tree | cbe5800850ec9d4ca8e679c0868bfe2a0af11752 /tests | |
parent | c84c8280cd71aef3191529ba286ebe85714365b2 (diff) | |
download | markdown-6d972b91d30d6e314fee111354b98ed4130eebe6.tar.gz markdown-6d972b91d30d6e314fee111354b98ed4130eebe6.tar.bz2 markdown-6d972b91d30d6e314fee111354b98ed4130eebe6.zip |
Improved inline pattern regex for em & strong and added tests. Fixes Ticket 30 and other related issues. Note that I went with php's behavior rather than perl's when we have have three (ie.: *** or ___) without a closing three.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/misc/em_strong.html | 10 | ||||
-rw-r--r-- | tests/misc/em_strong.txt | 20 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/misc/em_strong.html b/tests/misc/em_strong.html new file mode 100644 index 0000000..75c92d8 --- /dev/null +++ b/tests/misc/em_strong.html @@ -0,0 +1,10 @@ +<p>One asterisk: *</p> +<p>One underscore: _</p> +<p>Two asterisks: **</p> +<p>With spaces: * *</p> +<p>Two underscores __</p> +<p>with spaces: _ _</p> +<p>three asterisks: ***</p> +<p>with spaces: * * *</p> +<p>three underscores: ___</p> +<p>with spaces: _ _ _</p>
\ No newline at end of file diff --git a/tests/misc/em_strong.txt b/tests/misc/em_strong.txt new file mode 100644 index 0000000..d0774ad --- /dev/null +++ b/tests/misc/em_strong.txt @@ -0,0 +1,20 @@ +One asterisk: * + +One underscore: _ + +Two asterisks: ** + +With spaces: * * + +Two underscores __ + +with spaces: _ _ + +three asterisks: *** + +with spaces: * * * + +three underscores: ___ + +with spaces: _ _ _ + |