epub converter: fix <pre>

This commit is contained in:
shirshasa
2021-07-20 17:30:12 +03:00
parent eff824f446
commit 899a3e89ac

View File

@@ -432,10 +432,10 @@ def preprocess_block_tags(chapter_tag):
def _prepare_formatted(text):
text = text.replace("<", "\x3C;")
text = text.replace(">", "\x3E;")
text = text.replace('\t', "\xa0 \xa0 \xa0 ")
text = text.replace(' ', "\xa0 ")
text = text.replace("<", "\x3C")
text = text.replace(">", "\x3E")
text = text.replace('\t', "\xa0 \xa0 ") # &nbsp; &nbsp;
text = text.replace(' ', "\xa0")
return text