Increase coverage in evennia/utils/text2html

This commit is contained in:
Henddher Pedroza 2019-10-19 20:39:40 -04:00
parent 77965fadd3
commit cea0e1a0a4
2 changed files with 58 additions and 2 deletions

View file

@ -310,8 +310,7 @@ class TextToHTMLparser(object):
elif cdict["firstspace"]:
return "  "
elif cdict["space"] == "\t":
text = match.group()
return " " if tabstop == 1 else " " + " " * tabstop
return " " if self.tabstop == 1 else " " + " " * self.tabstop
elif cdict["space"] or cdict["spacestart"]:
text = match.group().replace("\t", " " * self.tabstop)
text = text.replace(" ", " ")