Just moving code around, no change
This commit is contained in:
parent
31b6e51cb8
commit
d96e2c61bb
@ -12,12 +12,6 @@ type InlineTextContent struct {
|
|||||||
Texts []string `xml:"texts,omitempty"`
|
Texts []string `xml:"texts,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *InlineTextContent) isContent() bool { return true }
|
|
||||||
|
|
||||||
func (i *InlineTextContent) hasSRC() bool { return false }
|
|
||||||
|
|
||||||
func (i *InlineTextContent) getType() string { return i.Type }
|
|
||||||
|
|
||||||
func newInlineTextContent(mediaType string, content any) (*InlineTextContent, error) {
|
func newInlineTextContent(mediaType string, content any) (*InlineTextContent, error) {
|
||||||
if mediaType != "text" && mediaType != "html" && mediaType != "" {
|
if mediaType != "text" && mediaType != "html" && mediaType != "" {
|
||||||
return nil, fmt.Errorf("media type %v incompatible with inline text content", mediaType)
|
return nil, fmt.Errorf("media type %v incompatible with inline text content", mediaType)
|
||||||
@ -42,6 +36,12 @@ func newInlineTextContent(mediaType string, content any) (*InlineTextContent, er
|
|||||||
return &InlineTextContent{Type: mediaType, Texts: texts}, nil
|
return &InlineTextContent{Type: mediaType, Texts: texts}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (i *InlineTextContent) isContent() bool { return true }
|
||||||
|
|
||||||
|
func (i *InlineTextContent) hasSRC() bool { return false }
|
||||||
|
|
||||||
|
func (i *InlineTextContent) getType() string { return i.Type }
|
||||||
|
|
||||||
func (i *InlineTextContent) Check() error {
|
func (i *InlineTextContent) Check() error {
|
||||||
if i.Type != "" && i.Type != "text" && i.Type != "html" {
|
if i.Type != "" && i.Type != "text" && i.Type != "html" {
|
||||||
return errors.New("type attribute of inline text content must be text or html if not omitted")
|
return errors.New("type attribute of inline text content must be text or html if not omitted")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user