From 0c543be2d399c0ff39fd302405b5427a02a1a7aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Boulogne?= Date: Fri, 21 Aug 2015 21:19:43 +0200 Subject: [PATCH] FIX error on Debian Jessie --- pandoc.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 = ''; -- 2.39.2