diff --git a/front_end/src/components/markdown_editor/initialized_editor.tsx b/front_end/src/components/markdown_editor/initialized_editor.tsx index 3c019f99bf..cbf6038275 100644 --- a/front_end/src/components/markdown_editor/initialized_editor.tsx +++ b/front_end/src/components/markdown_editor/initialized_editor.tsx @@ -73,9 +73,22 @@ const PrismCodeBlock: FC<{ code?: string; language?: string }> = ({ theme === "dark" ? prismThemes.dracula : prismThemes.github; const raw = (language as string | undefined) ?? "ts"; - const prismLang = CANONICAL_TO_PRISM[normalizeLang(raw)] ?? "tsx"; + const normalizedLang = normalizeLang(raw); const codeTrimmed = (code ?? "").replace(/^\n+|\n+$/g, ""); + // Handle plain text without syntax highlighting + if (normalizedLang === "text") { + return ( +
+ {codeTrimmed}
+
+