chore: add remark emoji plugin

This commit is contained in:
Stevan Freeborn
2023-09-11 21:35:12 -05:00
parent d7dd636ae7
commit 67548759e4
3 changed files with 144 additions and 1 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import ReactMarkdown from 'react-markdown';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import { oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism';
import remarkEmoji from 'remark-emoji';
import remarkGfm from 'remark-gfm';
import './MarkdownContent.css';
@@ -8,7 +9,7 @@ export default function PostContent({ content }: { content: string }) {
return (
<div className='markdown-content'>
<ReactMarkdown
remarkPlugins={[remarkGfm]}
remarkPlugins={[remarkGfm, remarkEmoji]}
components={{
code({ node, inline, className, children, ...props }) {
const match = /language-(\w+)/.exec(className || '');