Changes before announcement to hcoop-discuss
[hcoop/domtool2.git] / src / autodoc.sml
index 87134e4..b342e6e 100644 (file)
@@ -144,15 +144,18 @@ fun autodoc {outdir, infiles} =
        val items = map (fn file =>
                            let
                                val file' = modify file
+                               val (desc, _, _) = Parse.parse file
                            in
                                LI {ty = NONE,
                                    value = NONE,
-                                   content = TextBlock (A {name = NONE,
-                                                           href = SOME (file' ^ ".html"),
-                                                           rel = NONE,
-                                                           rev = NONE,
-                                                           title = NONE,
-                                                           content = PCDATA (uppercase file')})}
+                                   content = BlockList
+                                                 [TextBlock (A {name = NONE,
+                                                                href = SOME (file' ^ ".html"),
+                                                                rel = NONE,
+                                                                rev = NONE,
+                                                                title = NONE,
+                                                                content = PCDATA (uppercase file')}),
+                                                  TextBlock (PCDATA (Option.getOpt (desc, "")))]}
                            end) infiles
 
        val index = HTML {version = NONE,