aboutsummaryrefslogtreecommitdiffstats
path: root/tests/richstring_test.py
diff options
context:
space:
mode:
authorMartin Vilcans <martin@librador.com>2011-12-16 22:49:34 +0100
committerMartin Vilcans <martin@librador.com>2011-12-16 23:07:43 +0100
commit1f76285463d19f21e7e09ddb8c6fc876ea2c8740 (patch)
treeaaf9062e4c68a43925ebcc4c1cee4714fbe55bb4 /tests/richstring_test.py
parent1fc5cb7fe743133470c32fa4d0a13666c6735b05 (diff)
downloadscreenplain-1f76285463d19f21e7e09ddb8c6fc876ea2c8740.tar.gz
Possible to escape stars (\*) so they aren't parsed as emphasis.
Diffstat (limited to 'tests/richstring_test.py')
-rw-r--r--tests/richstring_test.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/richstring_test.py b/tests/richstring_test.py
index 0e83aa1..5e5f7f5 100644
--- a/tests/richstring_test.py
+++ b/tests/richstring_test.py
@@ -199,3 +199,9 @@ class ParseEmphasisTests(unittest2.TestCase):
parse_emphasis('**first** **second**'),
bold('first') + plain(' ') + bold('second')
)
+
+ def test_escaping_star_creates_a_literal_star(self):
+ self.assertEquals(
+ parse_emphasis(r'\*hello*'),
+ plain('*hello*')
+ )