]> git.g-eek.se Git - ikiwiki-pandoc.git/commitdiff
Changed method for string compilation from JSON array. Now it handles symbols correct...
authorRyan Burgoyne <rburgoyne@gecoinc.com>
Fri, 22 Feb 2013 19:37:48 +0000 (12:37 -0700)
committerRyan Burgoyne <rburgoyne@gecoinc.com>
Fri, 22 Feb 2013 19:37:48 +0000 (12:37 -0700)
pandoc.pm

index ed95c11b9409a498746eba690c13e60788a82a9d..dbf04ed097073c996053c098b7f5cf5833d7b0b4 100644 (file)
--- a/pandoc.pm
+++ b/pandoc.pm
@@ -234,14 +234,19 @@ sub htmlize ($@) {
     my @doc_date = @{$header_section{'docDate'}};
 
     sub compile_string {
+        # The uncompiled string is an array of hashes containing words and 
+        # string with the word "Space".
         my (@uncompiled_string) = @_;
-        my @string_without_spaces;
+        my $compiled_string = '';
         foreach my $word_or_space(@uncompiled_string) {
             if (ref($word_or_space) eq "HASH") {
-                push @string_without_spaces, $word_or_space->{"Str"};
+                $compiled_string .= $word_or_space->{"Str"};
+            }
+            else {
+                $compiled_string .= ' ';
             }
         }
-        return join " ", @string_without_spaces;
+        return $compiled_string;
     }
 
     my $title = compile_string @doc_title;