commit 9f88d9fe994d41e5cf64c68368fb65b51f205faa
parent f2824733f1130a74987b38355091477ceca15b47
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Tue, 8 Mar 2016 21:00:54 -0500
fix verb handling
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/doc/txt.ml b/doc/txt.ml
@@ -94,7 +94,9 @@ let isulist l = endbul l <> 0
let getverb lines idnt =
let rec f ls =
match top lines with
- | Some (n, i, l) when i >= idnt || l = "" ->
+ | Some (n, i, l)
+ when i >= idnt
+ || dedent l (i+1) = "" ->
pop lines;
f (dedent l idnt :: ls)
| _ ->
@@ -166,7 +168,7 @@ let rec getdoc lines si acc =
pop lines;
l
end in
- let verb = getverb lines i in
+ let verb = getverb lines (si+1) in
getdoc lines si (Verb (ty, verb) :: acc);
end else
if si = 0 && String.haspref "~ " l