summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/txt/txt.css5
-rw-r--r--doc/txt/txt.ml10
2 files changed, 11 insertions, 4 deletions
diff --git a/doc/txt/txt.css b/doc/txt/txt.css
index a012223..6f11930 100644
--- a/doc/txt/txt.css
+++ b/doc/txt/txt.css
@@ -2,3 +2,8 @@ h3 {
 	border-bottom: 1px solid #aaa;
 	background-color: #eee;
 }
+
+.bnf {
+	background-color: white;
+	padding-left: 0.7em;
+}
diff --git a/doc/txt/txt.ml b/doc/txt/txt.ml
index a753cc3..d2c4f27 100644
--- a/doc/txt/txt.ml
+++ b/doc/txt/txt.ml
@@ -175,9 +175,9 @@ let rec getdoc lines si acc =
     if i > si then begin                          (* Verb item *)
       let ty =
         let l = dedent l i in
-        if l.[0] <> '[' then "" else begin
+        if l.[0] <> '`' then "" else begin
           pop lines;
-          l
+          String.suff l 1
         end in
       let verb = getverb lines (si+1) in
       getdoc lines si (Verb (ty, verb) :: acc);
@@ -292,8 +292,10 @@ let rec dochtml titles d =
       printf "<ul>\n";
       plist l;
       printf "</ul>\n";
-    | Verb (_, v) ->
-      printf "<pre>\n";
+    | Verb (cls, v) ->
+      if cls <> ""
+      then printf "<pre class=\"%s\">" cls
+      else printf "<pre>\n";
       escape v;
       printf "\n</pre>\n";
     | Par p ->