From f7ab1ef607d3eb7c438663ce63c6b6fd30ca51c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tina=20M=C3=BCller?= Date: Tue, 3 Oct 2023 16:40:03 +0200 Subject: [PATCH] Allow escaped double quotes in map keys Example: - "a \\"bc": def --- lib/YAML/Loader.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/YAML/Loader.pm b/lib/YAML/Loader.pm index b3c9122..f57cf14 100644 --- a/lib/YAML/Loader.pm +++ b/lib/YAML/Loader.pm @@ -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 ) {