Skip to content

Commit

Permalink
Fix regex to use anchors with all alternations.
Browse files Browse the repository at this point in the history
  • Loading branch information
patch committed Sep 6, 2010
1 parent b1d7c4d commit 6dec13b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/YAML/Dumper.pm
Expand Up @@ -124,7 +124,7 @@ method dump_alias($node) {
}

method dump_string($node) {
return $.dump_single($node) if $node ~~ /^ true | false | null | '~' $/;
return $.dump_single($node) if $node ~~ /^ [ true | false | null | '~' ] $/;
return $.dump_double($node) if $node ~~ /^ ' ' /;
return $.dump_double($node) if $node ~~ / ' ' $/;
return $.dump_double($node) if $node ~~ / \n | '"' /;
Expand Down

0 comments on commit 6dec13b

Please sign in to comment.