docbook->texi fix
authorAndy Wingo <wingo@pobox.com>
Tue, 8 May 2012 14:03:54 +0000 (16:03 +0200)
committerAndy Wingo <wingo@pobox.com>
Tue, 8 May 2012 14:03:54 +0000 (16:03 +0200)
* module/texinfo/docbook.scm (*sdocbook->stexi-rules*): Only convert
  ulink to uref if there is a URL attribute.

module/texinfo/docbook.scm

index 50a7bbc..c5a8d65 100644 (file)
@@ -97,8 +97,12 @@ a number of generic rules for transforming docbook into texinfo."
     (subsection . ,identity)
     (subsubsection . ,identity)
     (ulink . ,(lambda (tag attrs . body)
-                `(uref (% ,(assq 'url (cdr attrs))
-                          (title ,@body)))))
+                (cond
+                 ((assq 'url (cdr attrs))
+                  => (lambda (url)
+                       `(uref (% ,url (title ,@body)))))
+                 (else
+                  (car body)))))
     (*text* . ,detag-one)
     (*default* . ,(lambda (tag . body)
                     (let ((subst (assq tag tag-replacements)))