Subject: | Text with embedded newlines |
The attached file shows a case where YAML.pm does not create the correct YAML , at least the deserialized data structure does not equal the original data structure. The problem seems to appear if the second line of a text block is empty.
#!/usr/bin/perl
use Test::More qw(no_plan);
use YAML;
use Data::Compare;
$outdata = {'text' => 'Bla:
- Foo
- Bar
'};
$outdata2 = YAML::Load(YAML::Dump($outdata));
is(Compare($outdata, $outdata2), 0);