From 1f76285463d19f21e7e09ddb8c6fc876ea2c8740 Mon Sep 17 00:00:00 2001 From: Martin Vilcans Date: Fri, 16 Dec 2011 22:49:34 +0100 Subject: Possible to escape stars (\*) so they aren't parsed as emphasis. --- tests/richstring_test.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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*') + ) -- cgit v1.2.3