Instanciate common attributes everywhere so one can simply use the extend method
This commit is contained in:
@@ -16,7 +16,10 @@ type Generator struct {
|
||||
|
||||
// NewGenerator creates a new Generator. It returns a *Generator.
|
||||
func NewGenerator(text string) *Generator {
|
||||
return &Generator{Text: html.UnescapeString(text)}
|
||||
return &Generator{
|
||||
CommonAttributes: newCommonAttributes(),
|
||||
Text: html.UnescapeString(text),
|
||||
}
|
||||
}
|
||||
|
||||
// Check checks the Generator for incompatibilities with RFC4287. It returns an
|
||||
|
Reference in New Issue
Block a user