X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/54a4151306458686ec1de8ba3d2adbb86a69e576..19a7752021249eb8984e523fd6ed5a3730dc9be7:/IkiWiki/Plugin/graphviz.pm?ds=inline diff --git a/IkiWiki/Plugin/graphviz.pm b/IkiWiki/Plugin/graphviz.pm index 48f520c4f..fb3239227 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 (@) { #{{{