1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

read-print: 'pretty-print-with-comments' keeps newlines on long strings.

* guix/read-print.scm (printed-string)[preserve-newlines?]: New
procedure.
Use it to preserve newlines on long strings.
* tests/read-print.scm: Add test.
This commit is contained in:
Ludovic Courtès
2023-04-24 10:10:00 +02:00
committed by Ludovic Courtès
parent 74e96c4cb1
commit 7931ac810b
2 changed files with 14 additions and 2 deletions

View File

@@ -194,6 +194,11 @@ expressions."
(test-pretty-print "\
(string-append \"a\\tb\" \"\\n\")")
(test-pretty-print "\
(display \"This is a very long string.
It contains line breaks, which are preserved,
because it's a long string.\")")
(test-pretty-print "\
(description \"abcdefghijkl
mnopqrstuvwxyz.\")"