From c30f5e0472f2463f475e6e4d4cf80341ab1e0e62 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 18 Jun 2024 12:42:48 -0500 Subject: Fix verbatim processing fully No more special-casing on the surface of the code; that is, the filter expects a list of strings and outputs a single string, etc. --- lib/emit.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/emit.scm') diff --git a/lib/emit.scm b/lib/emit.scm index 68912cf..6c0479c 100644 --- a/lib/emit.scm +++ b/lib/emit.scm @@ -84,7 +84,7 @@ (printf (get-format 'verb 'stanza) ((get-filter 'verb 'stanza) t))) (let ((el (car stanza)) - (text (string-join (apply append (cdr stanza)) "\n"))) + (text (apply append (cdr stanza)))) (with-output-to-string (lambda () (cond @@ -98,12 +98,13 @@ (process command (cdr cmdline) (cons `("JIMMY_OUTPUT" . ,(->string (output-type))) (get-environment-variables))) - (display (ensure-newline text) out) + (display ((o ensure-newline (cut string-join <> "\n")) text) + out) (close-output-port out) (display (read-string #f in)) (newline)) - (emit-verbatim t)))) - (else (emit-verbatim t))))))) + (emit-verbatim text)))) + (else (emit-verbatim text))))))) ;;; Utilities -- cgit 1.4.1-21-gabe81