Instanciate common attributes everywhere so one can simply use the extend method
This commit is contained in:
@@ -17,7 +17,12 @@ type InlineOtherContent struct {
|
||||
// *InlineOtherContent and an error.
|
||||
func newInlineOtherContent(mediaType string, content any) *InlineOtherContent {
|
||||
mediaType, _, _ = mime.ParseMediaType(mediaType)
|
||||
return &InlineOtherContent{Type: mediaType, AnyElement: content}
|
||||
|
||||
return &InlineOtherContent{
|
||||
CommonAttributes: newCommonAttributes(),
|
||||
Type: mediaType,
|
||||
AnyElement: content,
|
||||
}
|
||||
}
|
||||
|
||||
// isContent checks whether the InlineOtherContent is a Content. It returns a
|
||||
|
Reference in New Issue
Block a user