Skip to content

Commit 4898b4b

Browse files
committed
More cleanup
1 parent 347c69e commit 4898b4b

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

webview-ui/src/components/ui/markdown/Markdown.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff 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-
2315
export 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
}

0 commit comments

Comments
 (0)