commit fc1a998292338d0144961591ebcd9373c2b80faf
parent 430a6b83e00ae35afce55c472ac70f1e840abec0
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Tue, 8 Mar 2016 21:56:32 -0500
html5 conformance fixes
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git 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
@@ -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;