diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-30 16:25:17 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-30 16:25:17 -0400 |
commit | 6cadcacffd76cf60739372029fb73ff333bdd6e5 (patch) | |
tree | 2605977498884e17a02a78dd04519c4fced032c5 /IkiWiki | |
parent | df8f87770e4e7607dde9544edcb6cc990b625844 (diff) | |
download | ikiwiki-6cadcacffd76cf60739372029fb73ff333bdd6e5.tar ikiwiki-6cadcacffd76cf60739372029fb73ff333bdd6e5.tar.gz |
apply Postel's law
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/graphviz.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/graphviz.pm b/IkiWiki/Plugin/graphviz.pm index 0889bc9fc..b9f997e04 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"); |