diff --git a/lib/Fmt.ml b/lib/Fmt.ml index 2fb707203b..157f989f26 100644 --- a/lib/Fmt.ml +++ b/lib/Fmt.ml @@ -143,7 +143,7 @@ let utf8_length s = let str_as n s = let stack = Box_debug.get_stack () in with_pp (fun fs -> - Box_debug.start_str fs ; + Box_debug.start_str fs s ; Format_.pp_print_as fs n s ; Box_debug.end_str ~stack fs ) diff --git a/lib/box_debug.ml b/lib/box_debug.ml index a2af7e73ab..6637be2bec 100644 --- a/lib/box_debug.ml +++ b/lib/box_debug.ml @@ -42,6 +42,11 @@ let css = .fits_or_breaks { background-color: red; } + .string_with_whitespaces { + background-color: yellow; + white-space: pre; + } + .tooltiptext { visibility: hidden; width: min-content; @@ -132,7 +137,15 @@ let force_newline ?stack fs = debugf fs "