tuned;
authorwenzelm
Sat, 30 Jan 2021 18:58:56 +0100
changeset 73205 e2c25ea2ccf1
parent 73204 aa3d4cf7825a
child 73206 3d881c1531f3
tuned;
src/Pure/Thy/html.scala
--- a/src/Pure/Thy/html.scala	Sat Jan 30 18:34:37 2021 +0100
+++ b/src/Pure/Thy/html.scala	Sat Jan 30 18:58:56 2021 +0100
@@ -83,22 +83,24 @@
     Set("head", "body", "meta", "div", "pre", "p", "title", "h1", "h2", "h3", "h4", "h5", "h6",
       "ul", "ol", "dl", "li", "dt", "dd")
 
-  def output(s: StringBuilder, body: XML.Body, hidden: Boolean, structural: Boolean)
+  def output(s: StringBuilder, xml: XML.Body, hidden: Boolean, structural: Boolean)
   {
-    def tree(t: XML.Tree): Unit =
-      t match {
+    def output_body(body: XML.Body): Unit =
+    {
+      body foreach {
         case XML.Elem(markup, Nil) =>
           XML.output_elem(s, markup, end = true)
         case XML.Elem(markup, ts) =>
           if (structural && structural_elements(markup.name)) s += '\n'
           XML.output_elem(s, markup)
-          ts.foreach(tree)
+          output_body(ts)
           XML.output_elem_end(s, markup.name)
           if (structural && structural_elements(markup.name)) s += '\n'
         case XML.Text(txt) =>
           output(s, txt, hidden = hidden, permissive = true)
       }
-    body.foreach(tree)
+    }
+    output_body(xml)
   }
 
   def output(body: XML.Body, hidden: Boolean, structural: Boolean): String =