summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile1
-rw-r--r--doc/txt.ml6
2 files changed, 4 insertions, 3 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 75fc6e6..a259015 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -11,6 +11,7 @@ html/%.html: %.txt
 	  echo '<link rel="stylesheet"' \
 	  	'href="http://c9x.me/css/simple.css"' \
 	  	'type="text/css" />'; \
+	  sed -ne '2{s,.*,<title>&</title>,;p;q}' $<; \
 	  echo '<div class="container">'; \
 	  sed -ne '2{s,.*,<h2>&</h2>,;p;q}' $<; \
 	  sed -e '1,3d' $< | ocaml txt.ml; \
diff --git a/doc/txt.ml b/doc/txt.ml
index 12e33e8..7414b11 100644
--- a/doc/txt.ml
+++ b/doc/txt.ml
@@ -271,11 +271,11 @@ let rec dochtml titles d =
     | Title (0, n, t) ->
       printf "<h3><a id='%d'>" n;
       escape t;
-      printf "</h3>\n";
+      printf "</a></h3>\n";
     | Title (_, n, t) ->
-      printf "<h3><a id='%d'>" n;
+      printf "<h4><a id='%d'>" n;
       escape t;
-      printf "</h4>\n";
+      printf "</a></h4>\n";
     | Olist l ->
       printf "<ol>\n";
       plist l;