]> git.donarmstrong.com Git - lilypond.git/commitdiff
(re-sub-alist): Robustify.
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 30 Sep 2002 09:05:21 +0000 (09:05 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 30 Sep 2002 09:05:21 +0000 (09:05 +0000)
ChangeLog
scm/to-xml.scm

index b2ea4d1d9748c9c2597e422e7a0957074a2f4658..0d63e4d9716bfcd3d05b8192035d02633cdf3a3d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * scm/to-xml.scm: Fixes.  input/trip.ly now parses as xml (without
        dtd).  Add preliminary dtd.
+       (re-sub-alist): Robustify.
 
 2002-09-29  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
index fc65e9d8478853e6b7dba632ea860e8fe3f8ae12..ea46d57241710c3d372fc7f6a745e05edb3f925f 100644 (file)
@@ -100,10 +100,10 @@ is then separated.
   (regexp-substitute/global #f re string 'pre to 'post))
 
 (define (re-sub-alist string alist)
-  (re-sub (caar alist) (cdar alist)
-         (if (pair? (cdr alist))
-             (re-sub-alist string (cdr alist))
-             string)))
+  (if (null? alist)
+      string
+      (re-sub (caar alist) (cdar alist)
+             (re-sub-alist string (cdr alist)))))
 
 (define xml-entities-alist
   '(("\"" . "&quot;")