Instanciate common attributes everywhere so one can simply use the extend method
This commit is contained in:
@@ -16,8 +16,9 @@ func (x *XHTMLText) isText() bool { return true }
|
||||
// newPlainText creates a new PlainText. It returns a *PlainText.
|
||||
func newXHTMLText(textType, content string) *XHTMLText {
|
||||
return &XHTMLText{
|
||||
Type: textType,
|
||||
XHTMLDiv: NewXHTMLDiv(content),
|
||||
CommonAttributes: newCommonAttributes(),
|
||||
Type: textType,
|
||||
XHTMLDiv: NewXHTMLDiv(content),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user