diff --git a/text.go b/text.go index 0f67192..221ba7c 100644 --- a/text.go +++ b/text.go @@ -13,7 +13,7 @@ type Text interface { func NewText(textType, content string) (Text, error) { switch textType { case "text", "": - return &PlainText{Type: "text", Text: content}, nil + return &PlainText{Type: textType, Text: content}, nil case "html": return &PlainText{Type: textType, Text: html.EscapeString(content)}, nil case "xhtml":