Skip to content

Commit

Permalink
Fix 'wrap-comments' not working with the janestreet profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Julow committed Jan 7, 2025
1 parent 5bac2e7 commit 1661213
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Cmts.ml
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,9 @@ end

let fmt_cmt (conf : Conf.t) cmt ~fmt_code =
let open Fmt in
let parse_comments_as_doc = conf.fmt_opts.ocp_indent_compat.v in
let parse_comments_as_doc =
conf.fmt_opts.wrap_docstrings.v && conf.fmt_opts.parse_docstrings.v
in
let decoded = Cmt.decode ~parse_comments_as_doc cmt in
(* TODO: Offset should be computed from location. *)
let offset = 2 + String.length decoded.prefix in
Expand Down

0 comments on commit 1661213

Please sign in to comment.