fix stexi->html double translation
authorAndy Wingo <wingo@pobox.com>
Sat, 26 Mar 2011 12:33:21 +0000 (13:33 +0100)
committerAndy Wingo <wingo@pobox.com>
Sat, 26 Mar 2011 12:33:40 +0000 (13:33 +0100)
* module/texinfo/html.scm (entry): Fix to avoid double translation:
  arg-req already pulls an stexi->shtml on its arg.

module/texinfo/html.scm

index 81dd1f1230a50e1fdeec43708be6fa4d28f9405d..709744dc31e8c86adc3a746c85137ae42dd81ab2 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; (texinfo html) -- translating stexinfo into shtml
 ;;;;
-;;;;   Copyright (C) 2009, 2010  Free Software Foundation, Inc.
+;;;;   Copyright (C) 2009, 2010, 2011  Free Software Foundation, Inc.
 ;;;;    Copyright (C) 2003,2004,2009 Andy Wingo <wingo at pobox dot com>
 ;;;; 
 ;;;; This library is free software; you can redistribute it and/or
@@ -148,14 +148,12 @@ name, @code{#}, and the node name."
                (apply append body)))))
 
 (define (entry tag args . body)
-  (let lp ((headings (list (arg-req 'heading args))) (body body))
+  (let lp ((out `((dt ,@(arg-req 'heading args))))
+           (body body))
     (if (and (pair? body) (pair? (car body)) (eq? (caar body) 'itemx))
-        (lp (cons (cdar body) headings)
+        (lp (append out `(dt ,@(map stexi->shtml (cdar body))))
             (cdr body))
-        `(,@(map (lambda (heading)
-                   `(dt ,@(map stexi->shtml heading)))
-                 headings)
-          (dd ,@(map stexi->shtml body))))))
+        (append out `((dd ,@(map stexi->shtml body)))))))
 
 (define tag-replacements
   '((titlepage    div (@ (class "titlepage")))