]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/graphviz.pm
response
[git.ikiwiki.info.git] / IkiWiki / Plugin / graphviz.pm
index 0889bc9fcd6720741679dec990f2d4349e866029..b9f997e04b123a11a50aa9dddac82d982fb2fbf7 100644 (file)
@@ -112,7 +112,15 @@ sub graph (@) {
                $p->handler(start => sub {
                        my %attrs=%{shift()};
                        if (exists $attrs{href}) {
-                               $s.="\"$attrs{href}\"";
+                               if ($s=~/href\s*=\s*"$/) {
+                                       $s.=$attrs{href};
+                               }
+                               elsif ($s=~/href\s*=\s*$/) {
+                                       $s.="\"$attrs{href}\"";
+                               }
+                               else {
+                                       $s.="href=\"$attrs{href}\"";
+                               }
                        }
                        $nested++;
                }, "attr");