Fix profunc parse and html tabs. Resolve #2246

This commit is contained in:
Griatch 2020-11-11 00:41:58 +01:00
parent 988f84de2d
commit 0e8c979134
3 changed files with 12 additions and 9 deletions

View file

@ -308,7 +308,7 @@ class TextToHTMLparser(object):
elif cdict["lineend"]:
return "<br>"
elif cdict["tab"]:
text = cdict["tab"].replace("\t", "<span class=\"tabspace\">&#0009;</span>")
text = cdict["tab"].replace("\t", " " + "&nbsp;" * (self.tabstop - 1))
return text
elif cdict["space"] or cdict["spacestart"]:
text = cdict["space"]