diff options
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | src/guile/skribilo/reader/outline.scm | 20 |
2 files changed, 30 insertions, 7 deletions
@@ -2,6 +2,23 @@ # arch-tag: automatic-ChangeLog--skribilo@sv.gnu.org--2006/skribilo--devo--1.2 # +2007-07-26 15:28:37 GMT Ludovic Courtes <ludo@gnu.org> patch-139 + + Summary: + `outline' reader: Fixed `append-trees'. + Revision: + skribilo--devo--1.2--patch-139 + + * src/guile/skribilo/reader/outline.scm (append-trees): Make sure only + symbols can appear as the head of the resulting list. + + modified files: + ChangeLog src/guile/skribilo/reader/outline.scm + + new patches: + lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-123 + + 2007-07-18 06:50:29 GMT Ludovic Courtes <ludovic.courtes@laas.fr> patch-138 Summary: diff --git a/src/guile/skribilo/reader/outline.scm b/src/guile/skribilo/reader/outline.scm index 7411892..1e64d01 100644 --- a/src/guile/skribilo/reader/outline.scm +++ b/src/guile/skribilo/reader/outline.scm @@ -83,15 +83,21 @@ equal to @var{name}, a markup name." (let loop ((trees trees) (result '())) (if (null? trees) - result + (let ((result (reverse! result))) + (cond ((and (pair? result) + (not (symbol? (car result)))) + ;; Make sure only symbols end up in the head. + (cons 'list result)) + (else + result))) (let ((tree (car trees))) (loop (cdr trees) - (append result - (if (list? tree) - (cond ((null? tree) '()) - ((symbol? (car tree)) (list tree)) - (else tree)) - (list tree)))))))) + (append (if (list? tree) + (cond ((null? tree) '()) + ((symbol? (car tree)) (list tree)) + (else tree)) + (list tree)) + result)))))) (define (null-string? s) (and (string? s) (string=? s ""))) |