X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/4cb343f3482edc3786ea46eea7efb7762d349164..82a4fb49aea0d2adca3db1a65ac086d01c21df6f:/IkiWiki/Plugin/graphviz.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/graphviz.pm b/IkiWiki/Plugin/graphviz.pm index 0889bc9fc..d4018edaa 100644 --- a/IkiWiki/Plugin/graphviz.pm +++ b/IkiWiki/Plugin/graphviz.pm @@ -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"); @@ -124,6 +132,7 @@ sub graph (@) { }, "text"); $p->parse($src); $p->eof; + $s=~s/\[ href= \]//g; # handle self-links $params{src}=$s; } else {