Add some newlines with inserted elements, to help readability.
authorChris Hanson <org/chris-hanson/cph>
Thu, 2 Feb 2006 20:53:23 +0000 (20:53 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 2 Feb 2006 20:53:23 +0000 (20:53 +0000)
v7/src/ssp/xhtml-expander.scm

index 2a2bee9e1ceed1a7b5b02462577f81278fb2991e..9097678295db31819224b841588b9b73b6c18c65 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: xhtml-expander.scm,v 1.8 2006/02/02 20:49:54 cph Exp $
+$Id: xhtml-expander.scm,v 1.9 2006/02/02 20:53:23 cph Exp $
 
 Copyright 2002,2003,2004,2006 Massachusetts Institute of Technology
 
@@ -36,10 +36,18 @@ USA.
         (read/expand-xml-file pathname
                               (make-expansion-environment pathname))))
     (if (not (xml-document-declaration document))
-       (set-xml-document-declaration! document
-                                      (make-xml-declaration "1.0" #f #f)))
+       (begin
+         (set-xml-document-declaration! document
+                                        (make-xml-declaration "1.0" #f #f))
+         (set-xml-document-misc-1! document
+                                   (cons "\n"
+                                         (xml-document-misc-1 document)))))
     (if (not (xml-document-dtd document))
-       (set-xml-document-dtd! document html-1.0-dtd))
+       (begin
+         (set-xml-document-dtd! document html-1.0-dtd)
+         (set-xml-document-misc-2! document
+                                   (cons "\n"
+                                         (xml-document-misc-2 document)))))
     (let ((root (xml-document-root document)))
       (if (not (find-xml-attr 'xmlns root))
          (set-xml-element-attributes!
@@ -78,7 +86,7 @@ USA.
                       `((scheme ,(pi-expander environment))
                         (svar ,svar-expander)
                         (sabbr ,sabbr-expander)))))))
-
+\f
 (define (make-expansion-environment pathname)
   (let ((pathname (merge-pathnames pathname))
        (environment (extend-top-level-environment expander-environment)))
@@ -101,7 +109,7 @@ USA.
                (expander-eval expression environment)
                (loop))))))
     (car *outputs*)))
-\f
+
 (define expander-eval eval)
 
 (define (svar-expander text)