Skip to content

Commit

Permalink
Add remark plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Oct 5, 2023
1 parent 66c626a commit c9464e0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/utils/DfMd.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'

interface Props {
source?: string
className?: string
}

export const DfMd = ({ source, className = '' }: Props) => (
<ReactMarkdown className={`markdown-body ${className}`} linkTarget='_blank'>
<ReactMarkdown
remarkPlugins={[remarkGfm]}
className={`markdown-body ${className}`}
linkTarget='_blank'
>
{source?.replaceAll('(https://app.subsocial.network/ipfs', '(https://ipfs.subsocial.network') ??
''}
</ReactMarkdown>
Expand Down

0 comments on commit c9464e0

Please sign in to comment.