lloydzhou 1 년 전
부모
커밋
2efedb1736
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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);