lloydzhou há 1 ano atrás
pai
commit
2efedb1736
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      app/components/markdown.tsx

+ 2 - 0
app/components/markdown.tsx

@@ -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);