Graphviz' strict mode not supported (with fix)

0 votes
asked Feb 18, 2016 in Bug by cgiess (140 points)
edited Feb 18, 2016 by cgiess
A graph can be defined as

[strict] (graph|digraph) name { statement-list }

see http://www.graphviz.org/cgi-bin/man?dot

Unfortunately PlantUML does not support the optional strict. I have created a fix (see diff below).

It would be nice if you could integrate it because with that I can fix an outstanding bug in the Confluence PlantUML plugin (https://avono-support.atlassian.net/browse/PUML-177).

Thank you,

 Christoph

 

Index: src/net/sourceforge/plantuml/directdot/PSystemDotFactory.java
===================================================================
--- src/net/sourceforge/plantuml/directdot/PSystemDotFactory.java    (revision 619)
+++ src/net/sourceforge/plantuml/directdot/PSystemDotFactory.java    (working copy)
@@ -50,7 +50,7 @@
 
     @Override
     public PSystemDot executeLine(PSystemDot system, String line) {
-        if (system == null && line.matches("(di)?graph\\s+\\w+\\s+\\{")) {
+        if (system == null && line.matches("(strict\\s+)?(di)?graph\\s+\\w+\\s+\\{")) {
             data = new StringBuilder(line);
             data.append("\n");
             return new PSystemDot(data.toString());
 

1 Answer

+1 vote
answered Feb 28, 2016 by plantuml (295,000 points)
selected Mar 8, 2016 by cgiess
 
Best answer
Hello,

Thanks for the patch, and sorry about the delay!

This will be included in next official release (probably next week-end).

Regards,
...