Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/components/Groups/SafeMarkdownRenderer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import * as React from 'react';
import ReactMarkdown from 'react-markdown';
import gfm from 'remark-gfm';
import remarkMath from 'remark-math';
import { useDarkMode } from '../../context/DarkModeContext';
import customRehypeKatex from '../../mdx-plugins/rehype-math';
import CodeBlock from '../markdown/CodeBlock/CodeBlock';
import YouTube from '../markdown/YouTube';
import Feedback from './Feedback';
Expand Down Expand Up @@ -90,8 +92,9 @@ export default function SafeMarkdownRenderer({ children }) {
return (
<div className="prose dark:prose-light max-w-none">
<ReactMarkdown
components={renderers as any}
remarkPlugins={[gfm as any]}
components={renderers}
remarkPlugins={[gfm as any, remarkMath as any]}
rehypePlugins={[customRehypeKatex as any]}
linkTarget="_blank"
className="react-markdown"
>
Expand Down