Skip to content

Commit 3e02fbd

Browse files
authored
fix: exclude doctypes + xml headers from svg sprite (#351)
1 parent a1f3100 commit 3e02fbd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

other/build-icons.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ async function generateSvgSprite({
115115
svg.removeAttribute('width')
116116
svg.removeAttribute('height')
117117

118-
return root.toString().trim()
118+
return svg.toString().trim()
119119
}),
120120
)
121121

@@ -127,6 +127,7 @@ async function generateSvgSprite({
127127
...symbols,
128128
`</defs>`,
129129
`</svg>`,
130+
'', // trailing newline
130131
].join('\n')
131132

132133
return writeIfChanged(outputPath, output)

0 commit comments

Comments
 (0)