Skip to content

Commit

Permalink
Fix logic error in SimpleYAML string escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Sep 17, 2024
1 parent b78c416 commit f4f3855
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Build/SimpleYAML.pm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ sub unparse_string {
return "'$d'";
} elsif ($d =~ /: / || $d =~ / #/ || $d =~ /[: \t]\z/) {
return "'$d'";
} elsif ($d eq '~' || $d eq 'null' || $d eq 'true' || $d eq 'false' && $d =~ /^(?:---|\.\.\.)/s) {
} elsif ($d eq '~' || $d eq 'null' || $d eq 'true' || $d eq 'false' || $d =~ /^(?:---|\.\.\.)/s) {
return "'$d'";
} elsif ($d =~ /^[-?:](?:\s|\z)/s) {
return "'$d'";
Expand Down

0 comments on commit f4f3855

Please sign in to comment.