Skip to content

Commit

Permalink
Allow escaped double quotes in map keys
Browse files Browse the repository at this point in the history
Example:

    - "a \\"bc": def
  • Loading branch information
perlpunk committed Oct 3, 2023
1 parent a3abf03 commit f7ab1ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/YAML/Loader.pm
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ sub _parse_seq {
}
elsif (
$preface =~ /^ (\s*) ((') (?:''|[^'])*? ' \s* \: (?:\ |$).*) $/x or
$preface =~ /^ (\s*) ((") (?:\\\\|[^"])*? " \s* \: (?:\ |$).*) $/x or
$preface =~ /^ (\s*) ((") (?:\\\\|\\"|[^"])*? " \s* \: (?:\ |$).*) $/x or
$preface =~ /^ (\s*) (\?.*$)/x or
$preface =~ /^ (\s*) ([^'"\s:#&!\[\]\{\},*|>].*\:(\ .*|$))/x
) {
Expand Down

0 comments on commit f7ab1ef

Please sign in to comment.