From f1cb6743891ffd3f38ca0bf6a0c94210e7730361 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Thu, 9 Jan 2014 22:41:30 -0500 Subject: Only escape ESCAPED_CHARS. Leave all other chars prefaced by a backslash alone. Fixes #242. Not sure why I thought that I needed to add another backslash. Thanks for the report and the test case @mhubig. --- markdown/inlinepatterns.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'markdown') diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index bd3d17b..c0bd3d1 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -231,7 +231,7 @@ class EscapePattern(Pattern): if char in self.markdown.ESCAPED_CHARS: return '%s%s%s' % (util.STX, ord(char), util.ETX) else: - return '\\%s' % char + return None class SimpleTagPattern(Pattern): -- cgit v1.2.3