Permalink
Browse files

Fix parsing YAML header

  • Loading branch information...
1 parent 5a55e2b commit 4d712bc94ba155f69e71f9f48f9eba2ea5d529bc @bacek bacek committed Jan 30, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −2 lib/YAML/Tiny.pm
  2. +0 −1 t/11_meta_yaml.t
View
@@ -83,9 +83,8 @@ method read_string($string) {
debug("Header", $match);
# Handle scalar documents
@lines.shift;
- # if ( defined $1 and $1 !~ /^(?:\#.+|\%YAML[: ][\d\.]+)\z/ ) {
# match[0] is RPA. Get first element.
- if +$match[0] {
+ if +$match[0] && !((~$match[0][0]) ~~ /^[ '#' .+ | '%YAML' [':'|' '] [\d\.]+ ]$/){
@result.push(self._read_scalar( ~$match[0][0], [ pir::new('Undef') ], @lines ));
next;
}
View
@@ -210,7 +210,6 @@ dynamic_config: 0
) ],
'Data-Swap',
nosyck => 1,
- todo => 1,
);

0 comments on commit 4d712bc

Please sign in to comment.