]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/graphviz.pm
update for rename of ikiwikiusers.mdwn to jasatamanjogja.mdwn
[git.ikiwiki.info.git] / IkiWiki / Plugin / graphviz.pm
index b9f997e04b123a11a50aa9dddac82d982fb2fbf7..479da6f7382c41e664297a3ef22e665fc4cd5812 100644 (file)
@@ -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 {