Fixed rendering of tabs in the document viewer

This commit is contained in:
Veronica K. B. Olsen
2019-11-01 18:24:42 +01:00
parent 36ce75e937
commit f823367917
2 changed files with 22 additions and 19 deletions
+6 -1
View File
@@ -40,11 +40,16 @@ class ToHtml(Tokenizer):
def doAutoReplace(self):
Tokenizer.doAutoReplace(self)
if self.forPreview:
tabFmt = " "*8
else:
tabFmt = " "
repDict = {
"<" : "&lt;",
">" : "&gt;",
"&" : "&amp;",
"\t" : "&emsp;",
"\t" : tabFmt,
nwUnicode.U_ENDASH : nwUnicode.H_ENDASH,
nwUnicode.U_EMDASH : nwUnicode.H_EMDASH,
nwUnicode.U_HELLIP : nwUnicode.H_HELLIP,