Skip to content

Commit 9a86c42

Browse files
committed
update
1 parent 459c373 commit 9a86c42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/components/markdown.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ export function PreCode(props: { children: any }) {
9090
const refText = ref.current.querySelector("code")?.innerText;
9191
if (htmlDom) {
9292
setHtmlCode((htmlDom as HTMLElement).innerText);
93-
} else if (refText?.startsWith("<!DOCTYPE")) {
93+
} else if (
94+
refText?.startsWith("<!DOCTYPE") ||
95+
refText?.startsWith("<svg") ||
96+
refText?.startsWith("<?xml")
97+
) {
9498
setHtmlCode(refText);
9599
}
96100
}, 600);

0 commit comments

Comments
 (0)