If our run of pandoc to convert pieces of markup in our hand, into
html, fails, print the json that was rejected.
No change in non-error cases.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Juergen Gross <jgross@suse.com>
my ($content) = @_;
my $json_fh = IO::File::new_tmpfile or die $!;
- print $json_fh to_json([
- { unMeta => { } },
- [{ t => 'Para', c => $content }],
- ]) or die $!;
+ my $j = to_json([
+ { unMeta => { } },
+ [{ t => 'Para', c => $content }],
+ ]) or die $!;
+ print $json_fh $j;
flush $json_fh or die $!;
seek $json_fh,0,0 or die $!;
open STDIN, '<&', $json_fh or die $!;
system 'json_pp';
};
- die "\n $? $!";
+ die "$j \n $? $!";
}
$html =~ s{^\<p\>}{} or die "$html ?";