diff options
author | Arun Isaac | 2023-11-17 10:23:10 +0000 |
---|---|---|
committer | Arun Isaac | 2023-11-17 10:23:10 +0000 |
commit | 19b9decada9b18b85e4197d0bc395389cba76fc3 (patch) | |
tree | 22f063f46fc56fb890ad5a6110be2d936dfc086b /ccwl | |
parent | 11bd42faae4f1f2546c6dff216dde07298abd681 (diff) | |
download | ccwl-19b9decada9b18b85e4197d0bc395389cba76fc3.tar.gz ccwl-19b9decada9b18b85e4197d0bc395389cba76fc3.tar.lz ccwl-19b9decada9b18b85e4197d0bc395389cba76fc3.zip |
yaml: Serialize atomic dictionary values on the same line.
* ccwl/yaml.scm (display-dictionary-entry): Serialize atomic values on
the same line.
* tests/yaml.scm ("dictionary keys that map to an atomic value must be
serialized on the same line"): New test.
Diffstat (limited to 'ccwl')
-rw-r--r-- | ccwl/yaml.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ccwl/yaml.scm b/ccwl/yaml.scm index 00942de..a33a88f 100644 --- a/ccwl/yaml.scm +++ b/ccwl/yaml.scm @@ -79,8 +79,9 @@ serialized to YAML. Else, return @code{#f}." ;; Display on the same line if value is ;; - an empty array ;; - an empty dictionary + ;; - an atom ;; - an array with an atom as its only element - ((or #() () #((? atom? _))) + ((or #() () (? atom? _) #((? atom? _))) (display " " port) (scm->yaml value port level)) ;; Else, display it on the next line. |