Index: pandociki/pandociki-1.0/pandoc.pm
===================================================================
--- pandociki.orig/pandociki-1.0/pandoc.pm
+++ pandociki/pandociki-1.0/pandoc.pm
@@ -124,6 +124,8 @@ sub htmlize ($@) {
     my %params = @_;
     my $page = $params{page};
 
+    my $target_format = 'html';
+
     local(*PANDOC_IN, *PANDOC_OUT);
     my @args;
 
@@ -140,7 +142,7 @@ sub htmlize ($@) {
     };
 
     if ($config{pandoc_html5}) {
-        push @args, '--html5';
+        $target_format = 'html5';
     };
 
     if ($config{pandoc_ascii}) {
@@ -188,7 +190,7 @@ sub htmlize ($@) {
     # $ENV{"LC_ALL"} = "en_US.UTF-8";
     my $pid = open2(*PANDOC_IN, *PANDOC_OUT, $command,
                     '-f', $format,
-                    '-t', 'html',
+                    '-t', $target_format,
                     @args);
 
     error("Unable to open $command") unless $pid;
