-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(zbugs): support mermaid diagrams
- Loading branch information
Showing
3 changed files
with
2,447 additions
and
622 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import MarkdownBase from 'react-markdown'; | ||
import remarkGfm from 'remark-gfm'; | ||
// import mermaid from 'rehype-mermaid'; | ||
import mermaid from 'remark-mermaidjs'; | ||
|
||
/** | ||
* Do not import this component directly. Use `Markdown` instead. | ||
*/ | ||
export default function Markdown({children}: {children: string}) { | ||
return <MarkdownBase rehypePlugins={[remarkGfm]}>{children}</MarkdownBase>; | ||
return ( | ||
<MarkdownBase remarkPlugins={[remarkGfm, mermaid]}>{children}</MarkdownBase> | ||
); | ||
} |
Oops, something went wrong.