This commit is contained in:
lloydzhou 2024-07-25 13:34:59 +08:00
parent 044116c14c
commit 2efedb1736
1 changed files with 2 additions and 0 deletions

View File

@ -76,6 +76,8 @@ export function PreCode(props: { children: any }) {
const htmlDom = ref.current.querySelector("code.language-html");
if (htmlDom) {
setHtmlCode((htmlDom as HTMLElement).innerText);
} else if (refText?.startsWith("<!DOCTYPE")) {
setHtmlCode(refText);
}
}, 600);