don't escape text in pre tag (Fenced Code Blocks) (#67)
don't escape text in pre tag (Fenced Code Blocks)
This commit is contained in:
@@ -158,7 +158,7 @@ class MarkdownConverter(object):
|
||||
and el.parent.parent.name == 'pre')):
|
||||
text = whitespace_re.sub(' ', text)
|
||||
|
||||
if el.parent.name != 'code':
|
||||
if el.parent.name != 'code' and el.parent.name != 'pre':
|
||||
text = self.escape(text)
|
||||
|
||||
# remove trailing whitespaces if any of the following condition is true:
|
||||
|
||||
Reference in New Issue
Block a user