Skip to content

Commit e72116e

Browse files
committed
bump ultrahtml instead
1 parent 991ad8a commit e72116e

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

packages/astro/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
"tinyexec": "^0.3.2",
164164
"tinyglobby": "^0.2.12",
165165
"tsconfck": "^3.1.5",
166-
"ultrahtml": "^1.5.3",
166+
"ultrahtml": "^1.6.0",
167167
"unist-util-visit": "^5.0.0",
168168
"unstorage": "^1.15.0",
169169
"vfile": "^6.0.3",

packages/astro/src/assets/utils/svg.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ function parseSvg(contents: string) {
1919

2020
export function makeSvgComponent(meta: ImageMetadata, contents: Buffer | string) {
2121
const file = typeof contents === 'string' ? contents : contents.toString('utf-8');
22-
const { attributes, body: children } = parseSvg(
23-
// NOTE: This is a workaround for the `ultrahtml` bug that adds empty attributes
24-
file.replaceAll(/\s+/g, ' '),
25-
);
22+
const { attributes, body: children } = parseSvg(file);
2623
const props: SvgComponentProps = {
2724
meta,
2825
attributes: dropAttributes(attributes),

pnpm-lock.yaml

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)