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

Subroutine element breaks flowchart #23

Open vic-t opened 3 years ago

vic-t commented 3 years ago

It seems that it's not possible to create subroutine elements with mermaid.js in DokuWiki. The following example doesn't produce any result:

<flow>
graph TD
Start --> c1{Condition}
c1 --> sub1[[Subroutine]]

</flow>

Replace [[subroutine]] with anything else, such as [(db)] and it will work fine, it's just the subroutine type that's not working.

I can only assume that it has to do with the fact that text in double square brackets are rendered as a link in DokuWiki and somehow the whole thing blows up.

Any workarounds?

Klap-in commented 1 year ago

What do you mean with ‘break’? That the entire item is not recognized, but printed as links? Or is it still recognized but only the [[..]] does not work as expected. What is then different?

The sort number of this syntax seems 158 https://github.com/jakob1111/dokuwiki-plugin-flowcharts/blob/4d22e5eb9c3559710ffb54b78cd6810d30233587/syntax.php#L26

The sort number for default link syntax is https://www.dokuwiki.org/devel:parser:getsort_list Is from 290 for camellinks up to 360 for filelinks.

The sort number means that if a syntax matches to multiple patterns, the syntax of the plugin or built-in syntax wins if it has the lowest sort number. As the sort number of this plugin is lower I do not expect that the built-in link parser is claiming this syntax. So my first guess is that internally in the plugin something happens?