summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-08 21:00:54 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-08 21:00:54 -0500
commit9f88d9fe994d41e5cf64c68368fb65b51f205faa (patch)
treeca78cd72176e20e0a5f7e3cf0ca9af44d940fc31
parentf2824733f1130a74987b38355091477ceca15b47 (diff)
downloadroux-9f88d9fe994d41e5cf64c68368fb65b51f205faa.tar.gz
fix verb handling
-rw-r--r--doc/txt.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/txt.ml b/doc/txt.ml
index 6c72bf6..12e33e8 100644
--- 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