summaryrefslogtreecommitdiff
path: root/ccwl
diff options
context:
space:
mode:
authorArun Isaac2021-04-26 14:07:51 +0530
committerArun Isaac2021-04-26 14:07:51 +0530
commite64acfac83e5d4150af630e6b0cc1ffc42279405 (patch)
treec6c5ae68b2e7f9e38bf106fa3ea0db9fc098d52a /ccwl
parent59fb1d126523c8a46ded7c8607fe1e9d7de40daf (diff)
downloadccwl-e64acfac83e5d4150af630e6b0cc1ffc42279405.tar.gz
ccwl-e64acfac83e5d4150af630e6b0cc1ffc42279405.tar.lz
ccwl-e64acfac83e5d4150af630e6b0cc1ffc42279405.zip
Escape asterisk characters in scm->yaml.
* ccwl/yaml.scm (display-atom): Escape asterisk characters. * tests/yaml.scm ("strings with asterisk characters should be escaped"): New test.
Diffstat (limited to 'ccwl')
-rw-r--r--ccwl/yaml.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/ccwl/yaml.scm b/ccwl/yaml.scm
index a891c60..19f26c2 100644
--- a/ccwl/yaml.scm
+++ b/ccwl/yaml.scm
@@ -54,9 +54,9 @@ ATOM is a symbol."
;; Escape string with double quotes if
;; - every character is a digit or period, and the unescaped
;; string can therefore be misinterpreted as a number
- ;; - string contains the colon or hyphen characters
+ ;; - string contains the colon, hyphen or asterisk characters
(if (or (string-every (char-set-union char-set:digit (char-set #\.)) atom)
- (string-any (char-set #\: #\-) atom))
+ (string-any (char-set #\: #\- #\*) atom))
(write atom port)
(display atom port)))
((boolean? atom)