eFrane / vuepress-plugin-mermaidjs

Vuepress plugin for mermaid.js diagrams
https://vuepress-plugin-mermaidjs.efrane.com
75 stars 21 forks source link

Add support for custom diagram styles via diagram comments #101

Open eFrane opened 2 years ago

eFrane commented 2 years ago

Since the component default-slot syntax is deprecated in 2.x, support for using custom styling should be re-added.

There are two ways to go here:

1) add argumentsto the fenced-block language descriptor, e.g. `` mermaid [style={css;rules;here;}] 2) parse the mermaid content for a special comment syntax, e.g.%% style css: rule;`

I currently tend towards going the second route as it seems more robust and also wouldn't destroy anything if the code blocks were copied into any other system.