From e55520e93cf554aca9f43bcfdb0e77490f1fdaf2 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Thu, 23 Mar 2023 11:28:07 +0000 Subject: [PATCH] fix: #5 crash if code block cannot be highlighted --- app/components/markdown.tsx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/app/components/markdown.tsx b/app/components/markdown.tsx index aff4ec0c..83bfe4ef 100644 --- a/app/components/markdown.tsx +++ b/app/components/markdown.tsx @@ -2,13 +2,19 @@ import ReactMarkdown from "react-markdown"; import "katex/dist/katex.min.css"; import RemarkMath from "remark-math"; import RehypeKatex from "rehype-katex"; -import RemarkGfm from 'remark-gfm' -import RehypePrsim from 'rehype-prism-plus' +import RemarkGfm from "remark-gfm"; +import RehypePrsim from "rehype-prism-plus"; export function Markdown(props: { content: string }) { - return ( - - {props.content} - - ); -} \ No newline at end of file + return ( + + {props.content} + + ); +}