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:
Adam Bambuch
2022-08-28 20:58:54 +02:00
committed by GitHub
parent 59eb069700
commit 17d8586843
2 changed files with 2 additions and 1 deletions

View File

@@ -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: