-
-
Save timo/8c1c395114765624803e5ea8ed223e55 to your computer and use it in GitHub Desktop.
potential fix for YAMLish, but it's ugly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/YAMLish.pm6 b/lib/YAMLish.pm6 | |
index 0848ed4..ca200ce 100644 | |
--- a/lib/YAMLish.pm6 | |
+++ b/lib/YAMLish.pm6 | |
@@ -451,7 +451,11 @@ grammar Grammar { | |
make ~$/; | |
} | |
method single-quoted($/) { | |
- make $<value>.Str.subst(/<Grammar::foldable-whitespace>/, ' ', :g).subst("''", "'", :g); | |
+ my $value = $<value>.Str; | |
+ make do { | |
+ my $/; | |
+ $value.subst(/<Grammar::foldable-whitespace>/, ' ', :g).subst("''", "'", :g); | |
+ } | |
} | |
method single-key($/) { | |
make $<value>.Str.subst("''", "'", :g); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment