chiark
/
gitweb
/
~ianmdlvl
/
nailing-cargo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca63fda
)
Fix bug in generation of quoted keys containing quotes themselves
author
Jeff Ober
<jober@ziprecruiter.com>
Fri, 17 Jan 2020 15:06:46 +0000
(10:06 -0500)
committer
Jeff Ober
<jober@ziprecruiter.com>
Fri, 17 Jan 2020 15:06:46 +0000
(10:06 -0500)
lib/TOML/Tiny/Writer.pm
patch
|
blob
|
history
diff --git
a/lib/TOML/Tiny/Writer.pm
b/lib/TOML/Tiny/Writer.pm
index 7c3067bde2a32a13ff623670165baed81f328877..f5ee59f9b38ec1fe8709dc086ac58af5ff171c7b 100644
(file)
--- a/
lib/TOML/Tiny/Writer.pm
+++ b/
lib/TOML/Tiny/Writer.pm
@@
-157,7
+157,11
@@
sub to_toml_key {
return $str;
}
- return qq{"$str"};
+ if ($str =~ /^"/) {
+ return qq{'$str'};
+ } else {
+ return qq{"$str"};
+ }
}
sub to_toml_string {