We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af288c3 commit efff2f3Copy full SHA for efff2f3
app/components/markdown.tsx
@@ -536,7 +536,7 @@ export function PreCode(props: { children: any; status?: boolean }) {
536
setOriginalCode(code);
537
538
const langClass = codeElement.className.match(/language-(\w+)/);
539
- let lang = langClass ? langClass[1] : "";
+ let lang = langClass ? langClass[1] : "text";
540
if (code.startsWith("<!DOCTYPE") || code.startsWith("<?xml")) {
541
lang = "html";
542
}
@@ -549,6 +549,7 @@ export function PreCode(props: { children: any; status?: boolean }) {
549
setContentType("svg");
550
setPreviewContent(code);
551
setLanguage("svg");
552
+ lang = "svg";
553
} else if (lang === "html") {
554
setLanguage("html");
555
setContentType("html");
0 commit comments