MacDownApp / macdown

Open source Markdown editor for macOS.
https://macdown.uranusjr.com/
9.44k stars 1.09k forks source link

Graphviz's filled and color attributes doesn't work #1138

Open Gowa2017 opened 4 years ago

Gowa2017 commented 4 years ago

Like

digraph { node [style=filled,color=white]; a -> b }

The result is: image

On viz-js.com , it seems :

image

I know why!. The mermaid we use is older version, it's css file 'mermaid.forest.css' override the node's style.

So, If we upgrade the mermeiad, we do not need the mermaid.forest.css file. So it is ok.

Like this: image

Gowa2017 commented 4 years ago

Reopen for have same problem too.

We should delete the mermaid stylesheets:

https://github.com/MacDownApp/macdown/blob/master/MacDown/Code/Document/MPRenderer.m#L437

FranklinYu commented 4 years ago

MWE to reproduce the bug? Please provide the text so it’s easy to copy-paste.

Gowa2017 commented 4 years ago

MWE to reproduce the bug? Please provide the text so it’s easy to copy-paste.

like this dot code

digraph { node [style=filled,color=blue]; a -> b }

I use blue to fill the node, but the color is memraid's color,as it define a node style which override the vizjs's style.But in memraid v8.3, this mermaid 's forest css file is not needed,so we should delete it.

FranklinYu commented 4 years ago

Took me a while to reproduce it. Full Markdown:

```dot
digraph { node [style=filled,color=blue]; a -> b }


If you enable Graphviz but disable Mermaid then it’s good; only when one enable both Mermaid and Graphviz will this issue be reproduced.