Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@renovamen/vuepress-plugin-mermaid@next didn't work #21

Closed
wn0x00 opened this issue Dec 22, 2021 · 2 comments
Closed

@renovamen/vuepress-plugin-mermaid@next didn't work #21

wn0x00 opened this issue Dec 22, 2021 · 2 comments

Comments

@wn0x00
Copy link

wn0x00 commented Dec 22, 2021

i use typora to write markdown, can use mermaid instead mermaidjs?

xxxx
xxxx

i use this plugin can't work well ,

@Renovamen
Copy link
Owner

Renovamen commented Dec 23, 2021

Hi, Vuepress uses Prism as default syntax highlighter, which supports language mermaid. To avoid the conflict with Prism, I have to use mermaidjs for this plugin (or the code would be rendered as a mermaid code block rather that a diagram Edit: at least in VuePress 2, the code would still be rendered as a diagram, but Prism's language-mermaid would become invalid).

I know it is incompatible with Typora, but I haven't come up with other workarounds.

@Renovamen
Copy link
Owner

Hi, v2.0.0-alpha.19 supports customizing the code block token (54b6a00) for plugin-mermaid, see #46 for details. Which means, if you still want to use token mermaid instead of mermaidjs and don't care about the conflict between this plugin and Prism, just:

module.exports = {
  plugins: [
    [
      "@renovamen/vuepress-plugin-mermaid", {
        token: "mermaid"
      }
    ]
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants