diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/txt/txt.ml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/txt/txt.ml b/doc/txt/txt.ml index 1b467ef..9f4f082 100644 --- a/doc/txt/txt.ml +++ b/doc/txt/txt.ml @@ -103,17 +103,19 @@ let isolist l = endnum l <> 0 let isulist l = endbul l <> 0 let getverb lines idnt = + let rec skip = function + | s :: l when String.trim s = "" -> skip l + | l -> l in let rec f ls = match top lines with | Some (n, i, l) when i >= idnt - || dedent l (i+1) = "" -> + || String.trim l = "" -> pop lines; f (dedent l idnt :: ls) | _ -> - List.rev ls |> - String.concat "\n" |> - String.trim in + skip ls |> List.rev |> + String.concat "\n" in f [] let getpar lines idnt = |