diff --git a/package.json b/package.json index 2ea65c5..b3514da 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@fortawesome/free-solid-svg-icons": "^6.5.1", "@fortawesome/react-fontawesome": "^0.2.0", "@heroicons/vue": "^2.1.1", + "@tailwindcss/typography": "^0.5.10", "@types/react-katex": "^3.0.4", "autoprefixer": "^10.4.16", "date-fns": "^3.3.1", @@ -23,6 +24,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-katex": "^3.0.1", + "react-markdown": "^9.0.1", "react-scroll-percentage": "^4.3.2", "recoil": "^0.7.7", "tailwindcss": "^3.4.1" diff --git a/src/components/Chat.tsx b/src/components/Chat.tsx index 3598689..9f228d2 100644 --- a/src/components/Chat.tsx +++ b/src/components/Chat.tsx @@ -6,6 +6,7 @@ import { faPaperPlane } from '@fortawesome/free-solid-svg-icons' import { formatDistance } from 'date-fns' import { ja } from 'date-fns/locale/ja' import { InlineMath } from 'react-katex'; +import Markdown from 'react-markdown'; export default function Chat() { const [page, _] = useRecoilState(currentPage); @@ -88,26 +89,32 @@ export default function Chat() { {alert} -
- {message.body.includes("$$") ?