From: Blake W. <bw...@la...> - 2008-02-15 22:30:15
|
(Apologies if any of you get this twice, I had a hiccup with my mail server.) (Uh, third time's a charm?) Looking at http://daringfireball.net/projects/markdown/syntax.php#backslash Markdown provides backslash escapes for the following characters: [...] ` backtick And yet, when I try it in (using markdown-1.6-py2.4.egg) ----------- >>> from markdown import markdown >>> x = "\\`This should not be in code.\\`" >>> print x \`This should not be in code.\` >>> print markdown( x ) <p>\<code>This should not be in code.\</code> </p> ----------- So I edit the code a little, as so (also attached): ----------- === modified file 'markdown.py' --- markdown.py 2008-02-15 21:28:18 +0000 +++ markdown.py 2008-02-15 21:28:30 +0000 @@ -944,9 +944,9 @@ self.prePatterns = [] - self.inlinePatterns = [ DOUBLE_BACKTICK_PATTERN, + self.inlinePatterns = [ ESCAPE_PATTERN, + DOUBLE_BACKTICK_PATTERN, BACKTICK_PATTERN, - ESCAPE_PATTERN, IMAGE_LINK_PATTERN, IMAGE_REFERENCE_PATTERN, REFERENCE_PATTERN, ----------- and that gives me: ----------- >>> from markdown import markdown >>> x = "\\`This should not be in code.\\`" >>> print x \`This should not be in code.\` >>> >>> print markdown( x ) <p>`This should not be in code.` </p> ----------- Which I believe is closer to the spec. Thanks, Blake. |