summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-09 15:18:06 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-09 15:18:06 -0500
commit8c1f6280f4e79849c26d79fd31718b9d25f1eeb6 (patch)
tree1de65105ebac665f0a03f176a62e9d755abeda01 /doc
parentce852217ceb58e79feab14f5518a352cc62f6bee (diff)
downloadroux-8c1f6280f4e79849c26d79fd31718b9d25f1eeb6.tar.gz
add possibility to style verb blocks
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 ->