mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-20 04:30:17 +09:00
Merge pull request #5816 from ConnectAI-E/feature/artifacts-svg
artifacts support svg
This commit is contained in:
commit
a392daab71
@ -90,7 +90,11 @@ export function PreCode(props: { children: any }) {
|
|||||||
const refText = ref.current.querySelector("code")?.innerText;
|
const refText = ref.current.querySelector("code")?.innerText;
|
||||||
if (htmlDom) {
|
if (htmlDom) {
|
||||||
setHtmlCode((htmlDom as HTMLElement).innerText);
|
setHtmlCode((htmlDom as HTMLElement).innerText);
|
||||||
} else if (refText?.startsWith("<!DOCTYPE")) {
|
} else if (
|
||||||
|
refText?.startsWith("<!DOCTYPE") ||
|
||||||
|
refText?.startsWith("<svg") ||
|
||||||
|
refText?.startsWith("<?xml")
|
||||||
|
) {
|
||||||
setHtmlCode(refText);
|
setHtmlCode(refText);
|
||||||
}
|
}
|
||||||
}, 600);
|
}, 600);
|
||||||
|
Loading…
Reference in New Issue
Block a user