Bug fixing

This commit is contained in:
Alexei Anoshenko 2024-04-22 20:03:40 +03:00
parent 50e5b8d44d
commit 7fd6a7985e
4 changed files with 5 additions and 16 deletions

View File

@ -259,8 +259,5 @@ func (image *backgroundImage) writeString(buffer *strings.Builder, indent string
} }
func (image *backgroundImage) String() string { func (image *backgroundImage) String() string {
buffer := allocStringBuilder() return runStringWriter(image)
defer freeStringBuilder(buffer)
image.writeString(buffer, "")
return buffer.String()
} }

View File

@ -347,8 +347,5 @@ func (gradient *backgroundConicGradient) writeString(buffer *strings.Builder, in
} }
func (gradient *backgroundConicGradient) String() string { func (gradient *backgroundConicGradient) String() string {
buffer := allocStringBuilder() return runStringWriter(gradient)
defer freeStringBuilder(buffer)
gradient.writeString(buffer, "")
return buffer.String()
} }

View File

@ -406,10 +406,7 @@ func (gradient *backgroundLinearGradient) writeString(buffer *strings.Builder, i
} }
func (gradient *backgroundLinearGradient) String() string { func (gradient *backgroundLinearGradient) String() string {
buffer := allocStringBuilder() return runStringWriter(gradient)
defer freeStringBuilder(buffer)
gradient.writeString(buffer, "")
return buffer.String()
} }
func (gradient *backgroundRadialGradient) Tag() string { func (gradient *backgroundRadialGradient) Tag() string {
@ -664,8 +661,5 @@ func (gradient *backgroundRadialGradient) writeString(buffer *strings.Builder, i
} }
func (gradient *backgroundRadialGradient) String() string { func (gradient *backgroundRadialGradient) String() string {
buffer := allocStringBuilder() return runStringWriter(gradient)
defer freeStringBuilder(buffer)
gradient.writeString(buffer, "")
return buffer.String()
} }

View File

@ -695,6 +695,7 @@ func writePropertyValue(buffer *strings.Builder, tag string, value any, indent s
for _, shadow := range value { for _, shadow := range value {
buffer.WriteString(indent2) buffer.WriteString(indent2)
shadow.writeString(buffer, indent) shadow.writeString(buffer, indent)
buffer.WriteRune(',')
} }
buffer.WriteRune('\n') buffer.WriteRune('\n')
buffer.WriteString(indent) buffer.WriteString(indent)