X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/34fff64e7b56f4f8cd99430f9f927d2a5d1e3619..99a4096397d9ee5ce65084ac80cc6ff3a0879df5:/IkiWiki/Plugin/graphviz.pm?ds=inline
diff --git a/IkiWiki/Plugin/graphviz.pm b/IkiWiki/Plugin/graphviz.pm
index bec122076..dfd66a03e 100644
--- a/IkiWiki/Plugin/graphviz.pm
+++ b/IkiWiki/Plugin/graphviz.pm
@@ -71,7 +71,8 @@ sub render_graph (\%) {
writefile($dest, $config{destdir}, $png, 1);
}
else {
- # can't write the file, so embed it in a data uri
+ # in preview mode, embed the image in a data uri
+ # to avoid temp file clutter
eval q{use MIME::Base64};
error($@) if $@;
return "
\n";
- }
- else {
- return "
\n";
- }
+ return "
\n";
}
sub graph (@) {