X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/54a4151306458686ec1de8ba3d2adbb86a69e576..b857b229d8ff3601bbf01fafa51a3b3d3da928d8:/IkiWiki/Plugin/graphviz.pm?ds=sidebyside
diff --git a/IkiWiki/Plugin/graphviz.pm b/IkiWiki/Plugin/graphviz.pm
index 48f520c4f..fe3559857 100644
--- a/IkiWiki/Plugin/graphviz.pm
+++ b/IkiWiki/Plugin/graphviz.pm
@@ -5,7 +5,7 @@ package IkiWiki::Plugin::graphviz;
use warnings;
use strict;
-use IkiWiki;
+use IkiWiki 2.00;
use IPC::Open2;
sub import { #{{{
@@ -41,7 +41,6 @@ sub render_graph (\%) { #{{{
$pid=open2(*IN, *OUT, "$params{prog} -Tpng");
# open2 doesn't respect "use open ':utf8'"
- binmode (IN, ':utf8');
binmode (OUT, ':utf8');
print OUT $src;
@@ -70,7 +69,12 @@ sub render_graph (\%) { #{{{
}
}
- return "\n";
+ if ($params{preview}) {
+ return "\n";
+ }
+ else {
+ return "\n";
+ }
} #}}}
sub graph (@) { #{{{