Unit tests for evennia/utils/text2html.

This commit is contained in:
Henddher Pedroza 2019-10-19 18:32:42 -04:00
parent 88a49334f2
commit 9e38cef5ff
2 changed files with 94 additions and 3 deletions

View file

@ -246,8 +246,7 @@ class TextToHTMLparser(object):
text (str): Processed text.
"""
return text
return text.replace(r"\n", r"<br>")
return text.replace("\n", r"<br>")
def convert_urls(self, text):
"""
@ -277,7 +276,7 @@ class TextToHTMLparser(object):
replaces MXP links with HTML code.
Args:
text (str): Text to process.
match (re.Matchobject): Match for substitution.
Returns:
text (str): Processed text.