From 35cb5085630d219990fab15cb72b37f314c656bb Mon Sep 17 00:00:00 2001 From: josc146 Date: Fri, 26 Jan 2024 13:30:31 +0800 Subject: [PATCH] safe markdown renderer (#609, #403) --- .../MarkdownRender/markdown-without-katex.jsx | 64 ++++++++++++++++++- src/components/MarkdownRender/markdown.jsx | 61 ++++++++++++++++++ 2 files changed, 124 insertions(+), 1 deletion(-) diff --git a/src/components/MarkdownRender/markdown-without-katex.jsx b/src/components/MarkdownRender/markdown-without-katex.jsx index f415c42..840be28 100644 --- a/src/components/MarkdownRender/markdown-without-katex.jsx +++ b/src/components/MarkdownRender/markdown-without-katex.jsx @@ -5,11 +5,73 @@ import remarkGfm from 'remark-gfm' import remarkBreaks from 'remark-breaks' import { Pre } from './Pre' import { Hyperlink } from './Hyperlink' +import { memo } from 'react' export function MarkdownRender(props) { return (