Skip to content

Commit

Permalink
Merge pull request #41 from A-F-V/40-markdown-tables
Browse files Browse the repository at this point in the history
Added remarkGfm to support markdown tables
  • Loading branch information
A-F-V authored Jul 1, 2023
2 parents d591449 + 8f05750 commit 816e40a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"react-spinners": "^0.13.8",
"redux": "^4.2.1",
"rehype-katex": "^6.0.3",
"remark-gfm": "^3.0.1",
"remark-math": "^5.1.1"
}
}
6 changes: 5 additions & 1 deletion src/plugins/Socrates/MessageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React from 'react';
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
import { AgentData } from './ConversationAgent';
import remarkGfm from 'remark-gfm';

export default function MessageView({
message,
Expand Down Expand Up @@ -53,7 +54,10 @@ export default function MessageView({
)}
</div>
</div>
<ReactMarkdown remarkPlugins={[remarkMath]} rehypePlugins={[rehypeKatex]}>
<ReactMarkdown
remarkPlugins={[remarkMath, remarkGfm]}
rehypePlugins={[rehypeKatex]}
>
{message.text}
</ReactMarkdown>
</div>
Expand Down

0 comments on commit 816e40a

Please sign in to comment.