gt6796c / mermaid-tw5

Tiddly Wiki 5 plugin to support the mermaid library
MIT License
19 stars 10 forks source link

Gantt diagrams not supported? #5

Closed shaneleonard closed 7 years ago

shaneleonard commented 7 years ago

Mermaid has support for Gantt diagrams, and I have been able to use them successfully in the past on some of my web projects, but the TW5 plugin doesn't seem to support Gantt diagrams. When I try to make a Gantt diagram, nothing is rendered (the same behavior as if there is a syntax error). I double checked that the same code works with the latest Mermaid, so it's not a syntax error. Is this a result of wrapping an older version of Mermaid? Would you be able to fix this simply by updating the version of Mermaid you used?

gt6796c commented 7 years ago

Gant diagrams are already supported, but not inline with the Twiddler. You have to put the Gantt chart into its own Twiddler and set its type to be "text/vnd.tiddlywiki.mermaid". The you can transclude it into your desired Twiddler.

This limitation is due to my understanding of how TW parses files it consideres to be Twiddlers. It eats up elements of the mermaid commands and they just go away. I tried to "un-parse" some thing and never got even close to supportable.

I have updated the docs to more strongly point this out as well as added a couple of examples showing that it works.

BTW, I did upgrade to mermaid 7.0.0 while I was at it. I didn't notice any differences, however.

shaneleonard commented 7 years ago

Thanks!