ingydotnet / yaml-pm

YAML Perl Module
http://search.cpan.org/dist/YAML/
20 stars 26 forks source link

YAML Dumper correctly writes database but YAML Loader omits multiple whitespaces. #183

Closed wilyarti closed 6 years ago

wilyarti commented 6 years ago

I have a YAML database with multiple hash entries. Some of these have multiple spaces in the filenames.

When the database is written the filename is correct. However when using YAML::Loader it will remove the occurrence of whitespace. If there are 4 spaces in a row it will be replaced with one space.

I have a sample database and perl script that replicates this error.

This may or not be a bug. If it isn't how to I get it to leave the white spaces in?

Here is a same database and perl script: TEST.pl.txt TEST.yaml.txt

perlpunk commented 6 years ago

Yes, this is a known bug and only happens, if the scalar is on the --- line. There is a PR #172 for that

wilyarti commented 6 years ago

Thanks! That worked.