Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
close debian bug I opened about blogspam
[git.ikiwiki.info.git]
/
IkiWiki
/
Plugin
/
graphviz.pm
diff --git
a/IkiWiki/Plugin/graphviz.pm
b/IkiWiki/Plugin/graphviz.pm
index 0889bc9fcd6720741679dec990f2d4349e866029..d4018edaaf9dad384818488356a3e7e8c4d8841c 100644
(file)
--- 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}) {
$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");
}
$nested++;
}, "attr");
@@
-124,6
+132,7
@@
sub graph (@) {
}, "text");
$p->parse($src);
$p->eof;
}, "text");
$p->parse($src);
$p->eof;
+ $s=~s/\[ href= \]//g; # handle self-links
$params{src}=$s;
}
else {
$params{src}=$s;
}
else {