qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 8c1f6280f4e79849c26d79fd31718b9d25f1eeb6
parent ce852217ceb58e79feab14f5518a352cc62f6bee
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Wed,  9 Mar 2016 15:18:06 -0500

add possibility to style verb blocks

Diffstat:
Mdoc/txt/txt.css | 5+++++
Mdoc/txt/txt.ml | 10++++++----
2 files changed, 11 insertions(+), 4 deletions(-)

diff --git 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 @@ -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 ->