File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
webview-ui/src/components/ui/markdown Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,7 @@ const MemoizedReactMarkdown: FC<Options> = memo(
1212 ( prevProps , nextProps ) => prevProps . children === nextProps . children && prevProps . className === nextProps . className ,
1313)
1414
15- const preprocessLaTeX = ( content : string ) => {
16- // Replace block-level LaTeX delimiters \[ \] with $$ $$
17- const blockProcessedContent = content . replace ( / \\ \[ ( [ \s \S ] * ?) \\ \] / g, ( _ , equation ) => `$$${ equation } $$` )
18-
19- // Replace inline LaTeX delimiters \( \) with $ $
20- return blockProcessedContent . replace ( / \\ \[ ( [ \s \S ] * ?) \\ \] / g, ( _ , equation ) => `$${ equation } $` )
21- }
22-
2315export function Markdown ( { content } : { content : string } ) {
24- const processedContent = preprocessLaTeX ( content )
25-
2616 return (
2717 < MemoizedReactMarkdown
2818 remarkPlugins = { [ remarkGfm ] }
@@ -85,7 +75,7 @@ export function Markdown({ content }: { content: string }) {
8575 )
8676 } ,
8777 } } >
88- { processedContent }
78+ { content }
8979 </ MemoizedReactMarkdown >
9080 )
9181}
You can’t perform that action at this time.
0 commit comments