Skip to content

Commit

Permalink
Add missing docstring normalization
Browse files Browse the repository at this point in the history
Without this docstrings with UTF8 withing `[]` have miscalculated lengths.
  • Loading branch information
jberdine committed Jul 21, 2021
1 parent 5df5c63 commit 82b388d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Fmt_odoc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ let fmt_code_block conf s1 s2 =
let box = match lines with _ :: _ :: _ -> vbox 0 | _ -> hvbox 0 in
box (wrap_code (vbox 0 (list_fl lines fmt_line)))

let fmt_code_span s = hovbox 0 (wrap "[" "]" (str (escape_brackets s)))
let fmt_code_span s =
hovbox 0 (wrap "[" "]" (str_normalized ~escape:escape_brackets s))

let fmt_reference = ign_loc ~f:str_normalized

Expand Down

0 comments on commit 82b388d

Please sign in to comment.