Skip to content

An AI-powered search engine with a generative UI

Add remark-gfm plugin to MemoizedReactMarkdown

Yoshiki Miura782200f052fe
diff --git a/bun.lockb b/bun.lockb
index e3414a6e..5fbb57a3 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/components/message.tsx b/components/message.tsx
index 173f3d43..b402f669 100644
--- a/components/message.tsx
+++ b/components/message.tsx
@@ -3,6 +3,7 @@
import { StreamableValue, useStreamableValue } from 'ai/rsc'
import { MemoizedReactMarkdown } from './ui/markdown'
import rehypeExternalLinks from 'rehype-external-links'
+import remarkGfm from 'remark-gfm'
export function BotMessage({
content
@@ -16,7 +17,7 @@ export function BotMessage({
return (
<MemoizedReactMarkdown
- rehypePlugins={[[rehypeExternalLinks, { target: '_blank' }]]}
+ rehypePlugins={[[rehypeExternalLinks, { target: '_blank' }, remarkGfm]]}
className="prose-sm prose-neutral prose-a:text-accent-foreground/50"
>
{data}
diff --git a/package.json b/package.json
index f2c25745..28a5e19e 100644
--- a/package.json
+++ b/package.json
@@ -35,6 +35,7 @@
"react-icons": "^5.0.1",
"react-markdown": "^9.0.1",
"rehype-external-links": "^3.0.0",
+ "remark-gfm": "^4.0.0",
"tailwind-merge": "^2.2.2",
"tailwindcss-animate": "^1.0.7"
},