Handle underline in text/enriched

This commit is contained in:
Peter J. Holzer 2019-03-17 22:42:44 +01:00
parent 8acf092559
commit b2f56c1660
1 changed files with 4 additions and 0 deletions

View File

@ -477,6 +477,10 @@ class TextEnrichedPart:
# HTML used to have a "big" element, but that has been removed from HTML5
pre = "<span style='font-size: 1.1em'>"
post = "</span>"
elif self.type == "underline":
# HTML5 redefined the meaning of "u", but I'm using it anyway
pre = "<u>"
post = "</u>"
else:
raise NotImplementedError("Unknown type " + self.type)