Skip to content

Commit

Permalink
only render math in two-dollar (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
mingming-ma committed Jan 20, 2024
1 parent 70914e7 commit 34fbb43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function Markdown({ previewCode, isLoading, onPrompt, children }: MarkdownProps)
<ReactMarkdown
className="message-text"
children={children}
remarkPlugins={[remarkGfm, remarkMath]}
remarkPlugins={[remarkGfm, [remarkMath, { singleDollarTextMath: false }]]}
rehypePlugins={[
// Open links in new tab
[rehypeExternalLinks, { target: "_blank" }],
Expand Down

0 comments on commit 34fbb43

Please sign in to comment.