Helper library of components for mdx in Bobril-build
Live example: https://bobril.com/mdx/
- Removed built-in Mermaid integration from
@bobril/mdx. - Mermaid integration moved to
@bobril/mdx-mermaid.
- Added optional support for mermaid diagrams
- Fixed javascript xss in a href attribute
Add @bobril/highlighter to dependencies.
import * as mdxCodeBlock from "@bobril/mdx/highlighter";
import * as styles from "@bobril/highlighter/styles";
mdxCodeBlock.setDefaultCodeBlock(styles.docco);Mermaid support is now provided by @bobril/mdx-mermaid.
Migration:
- old import:
@bobril/mdx/mermaid.tsx - new import:
@bobril/mdx-mermaid
It should be combined with @bobril/highlighter by installing Mermaid support after highlighter.
import { install } from "@bobril/mdx-mermaid";
install();
// this is optional
import * as mermaid from "@bobril/mermaid";
mermaid.setTheme("forest");