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