From 8c1f6280f4e79849c26d79fd31718b9d25f1eeb6 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Wed, 9 Mar 2016 15:18:06 -0500 Subject: add possibility to style verb blocks --- doc/txt/txt.css | 5 +++++ doc/txt/txt.ml | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'doc/txt') 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 "\n"; - | Verb (_, v) -> - printf "
\n";
+    | Verb (cls, v) ->
+      if cls <> ""
+      then printf "
" cls
+      else printf "
\n";
       escape v;
       printf "\n
\n"; | Par p -> -- cgit 1.4.1