From: François Boulogne Date: Fri, 21 Aug 2015 19:19:43 +0000 (+0200) Subject: FIX error on Debian Jessie X-Git-Url: https://git.g-eek.se/?a=commitdiff_plain;h=0c543be2d399c0ff39fd302405b5427a02a1a7aa;p=ikiwiki-pandoc.git FIX error on Debian Jessie --- diff --git a/pandoc.pm b/pandoc.pm index ddc5299..9cd224d 100755 --- a/pandoc.pm +++ b/pandoc.pm @@ -283,16 +283,16 @@ sub htmlize ($@) { my @perl_content = @{decode_json($json_content)}; my %header_section = %{$perl_content[0]}; my @doc_title = @{$header_section{'docTitle'}}; - my @doc_authors = @{$header_section{'docAuthors'}}; - my $num_authors = @doc_authors; + my @doc_authors = (defined(@{$header_section{'docAuthors'}}) || ['']); + my $num_authors = (defined(@doc_authors) || ['']); my @primary_author = (); if ($num_authors gt 0) { @primary_author = @{$doc_authors[0]}; } - my @doc_date = @{$header_section{'docDate'}}; + my @doc_date = (defined(@{$header_section{'docDate'}}) || ['']); sub compile_string { - # The uncompiled string is an array of hashes containing words and + # The uncompiled string is an array of hashes containing words and # string with the word "Space". my (@uncompiled_string) = @_; my $compiled_string = '';