jakob1111 / dokuwiki-plugin-flowcharts

Add flowcharts and diagrams to Dokuwiki with an incredibly simple syntax
GNU General Public License v2.0
7 stars 8 forks source link

Classes don't appear to work #6

Open dougthor42 opened 5 years ago

dougthor42 commented 5 years ago

Summary

It appears that class styles don't work.

Steps to Reproduce:

Add the following to a document:

<flow>
graph TD;
    vm[Virtual Machine] --> veeam(Veeam Backup<br>Daily);

    classDef Hardware fill:#f9f,stroke:#972,stroke-width:4px;
    classDef Actor fill:#fff,stroke:#000,stroke-width:4px;
    class vm Hardware;
    class veeam Actor;
</flow>

and then preview the document.

Expected Results:

Live Editor Results

image

Actual Results:

image

Other Notes:

Using explicit style values works:

<flow>
graph TD;
    vm[Virtual Machine] --> veeam(Veeam Backup<br>Daily);

    style vm fill:#f9f,stroke:#972,stroke-width:4px;
    style veeam fill:#fff,stroke:#000,stroke-width:4px;
</flow>

image

Version Info:

Howard3 commented 4 years ago

I patched this with the latest version of mermaidjs and added a security loose option that fixes this. Confirmed that it works in the latest version of master. Good luck!