X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2e4340766e792d93f2ce0a86f5c8d8042bbee789..2bc2e68962e121bebd6f0e73cf8be15336fb34df:/IkiWiki/Plugin/graphviz.pm?ds=inline diff --git a/IkiWiki/Plugin/graphviz.pm b/IkiWiki/Plugin/graphviz.pm index b9f997e04..479da6f73 100644 --- a/IkiWiki/Plugin/graphviz.pm +++ b/IkiWiki/Plugin/graphviz.pm @@ -95,6 +95,14 @@ sub render_graph (\%) { sub graph (@) { my %params=@_; + if (exists $params{file}) { + if (! exists $pagesources{$params{file}}) { + error gettext("cannot find file"); + } + $params{src} = readfile(srcfile($params{file})); + add_depends($params{page}, $params{file}); + } + # Support wikilinks in the graph source. my $src=$params{src}; $src="" unless defined $src; @@ -132,6 +140,7 @@ sub graph (@) { }, "text"); $p->parse($src); $p->eof; + $s=~s/\[ href= \]//g; # handle self-links $params{src}=$s; } else {