From a6f70f6731bb757687bfac39127b6b2821e4980a Mon Sep 17 00:00:00 2001 From: shirshasa Date: Tue, 6 Jul 2021 16:03:40 +0300 Subject: [PATCH] epub converter: fix
 3

---
 src/html_epub_preprocessor.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/html_epub_preprocessor.py b/src/html_epub_preprocessor.py
index fd6520a..22860d8 100644
--- a/src/html_epub_preprocessor.py
+++ b/src/html_epub_preprocessor.py
@@ -406,6 +406,7 @@ def preprocess_pre_tags(chapter_tag):
             if isinstance(child, NavigableString):
                 text = escape(pre.text)
                 text = text.replace('\t', '      ')
+                text = text.replace(' ', '  ')
                 elements = re.split('\r\n|\n|\r', text)
                 for i in elements:
                     new_tag.append(NavigableString(i))