Skip to content

Commit

Permalink
fix and test
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetiot committed Aug 18, 2019
1 parent 00f64d9 commit d9c6939
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 148 deletions.
2 changes: 1 addition & 1 deletion src/Fmt_odoc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ and fmt_list_light c kind items =
match kind with `Unordered -> fmt "- " | `Ordered -> fmt "+ "
in
let fmt_item elems =
line_start $ vbox 0 (fmt_nestable_block_elements c elems)
line_start $ hovbox 0 (fmt_nestable_block_elements c elems)
in
vbox 0 (list items "@," fmt_item)

Expand Down
160 changes: 13 additions & 147 deletions test/passing/doc_comments.mli.ref
Original file line number Diff line number Diff line change
Expand Up @@ -145,153 +145,21 @@ val x : x

list with long lines:

- xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
- yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
- zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
- xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx
- yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy
yyy yyy yyy yyy yyy yyy yyy
- zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz
zzz zzz zzz zzz zzz zzz zzz

enumerated list with long lines:

+ xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
xxx
+ yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
yyy
+ zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
zzz
+ xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx xxx xxx xxx xxx xxx xxx
+ yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy yyy
yyy yyy yyy yyy yyy yyy yyy
+ zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz zzz
zzz zzz zzz zzz zzz zzz zzz

list with sub lists:

Expand Down Expand Up @@ -369,9 +237,7 @@ end

(** {[ b ]} *)

(** - Odoc
don't
parse
(** - Odoc don't parse

multiple paragraph in a list *)

Expand Down
5 changes: 5 additions & 0 deletions test/passing/js_sig.mli
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ exception First_exception

(** Second documentation comment. *)
exception Second_exception

[@@@ocamlformat "parse-docstrings=true"]
[@@@ocamlformat "wrap-comments=true"]

(** {e foooooooo oooooo oooo oooo ooooo oooo ooooo} {i fooooo ooooo ooo oooooo oo oooooo oooo} {b fooooooo oooooo oooooo oooooo oooooo ooooooo} *)
6 changes: 6 additions & 0 deletions test/passing/js_sig.mli.ref
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ exception First_exception

(** Second documentation comment. *)
exception Second_exception

[@@@ocamlformat "parse-docstrings=true"]
[@@@ocamlformat "wrap-comments=true"]

(** {e foooooooo oooooo oooo oooo ooooo oooo ooooo} {i fooooo ooooo ooo oooooo oo oooooo
oooo} {b fooooooo oooooo oooooo oooooo oooooo ooooooo} *)

0 comments on commit d9c6939

Please sign in to comment.