Skip to content

Commit 82b388d

Browse files
committed
Add missing docstring normalization
Without this docstrings with UTF8 withing `[]` have miscalculated lengths.
1 parent 5df5c63 commit 82b388d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Fmt_odoc.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ let fmt_code_block conf s1 s2 =
8989
let box = match lines with _ :: _ :: _ -> vbox 0 | _ -> hvbox 0 in
9090
box (wrap_code (vbox 0 (list_fl lines fmt_line)))
9191

92-
let fmt_code_span s = hovbox 0 (wrap "[" "]" (str (escape_brackets s)))
92+
let fmt_code_span s =
93+
hovbox 0 (wrap "[" "]" (str_normalized ~escape:escape_brackets s))
9394

9495
let fmt_reference = ign_loc ~f:str_normalized
9596

0 commit comments

Comments
 (0)