From e902d4703126ddf5603210192d47c37e3b859f13 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 28 Jan 2023 12:33:57 +0000 Subject: html: Use for-each instead of explicit loop. * src/guile/skribilo/engine/html.scm (&html-footnotes): Use for-each instead of explicit loop. --- src/guile/skribilo/engine/html.scm | 41 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm index e9293e6..da40475 100644 --- a/src/guile/skribilo/engine/html.scm +++ b/src/guile/skribilo/engine/html.scm @@ -939,27 +939,26 @@ (display "
") (display "
\n")))) :action (lambda (n e) - (let ((footnotes (markup-body n))) - (when (pair? footnotes) - (let loop ((fns footnotes)) - (if (pair? fns) - (let ((fn (car fns))) - (display "\n
") - - ;; Note: the tags must not be nested. - (format #t "" - (string-canonicalize - (container-ident fn))) - (format #t "" - (string-canonicalize - (container-ident fn))) - (format #t "~a" - (markup-option fn :label)) - (output (markup-body fn) e) - - (display "\n
\n") - (loop (cdr fns))))) - (display "
"))))) + (let ((footnotes (markup-body n))) + (for-each (lambda (fn) + (display "\n
") + + ;; Note: the tags must not be nested. + + (format #t "" + (string-canonicalize + (container-ident fn))) + (format #t "" + (string-canonicalize + (container-ident fn))) + (format #t "~a" + (markup-option fn :label)) + (output (markup-body fn) e) + + (display "\n
\n")) + footnotes) + (when (pair? footnotes) + (display ""))))) ;*---------------------------------------------------------------------*/ ;* html-title-authors ... */ -- cgit v1.2.3