epub converter: fix <pre> 3

This commit is contained in:
shirshasa
2021-07-06 16:04:15 +03:00
parent a6f70f6731
commit 1f91be8f4b

View File

@@ -404,7 +404,7 @@ def preprocess_pre_tags(chapter_tag):
for child in pre.children:
if isinstance(child, NavigableString):
text = escape(pre.text)
text = pre.text
text = text.replace('\t', '&nbsp; &nbsp; &nbsp; ')
text = text.replace(' ', '&nbsp; ')
elements = re.split('\r\n|\n|\r', text)