Commit 2b9133aa authored by François Bobot's avatar François Bobot
Browse files

Pp : no newline inside the result of Pp.string_of

parent 06e080dd
......@@ -151,5 +151,9 @@ let rec print_list_opt sep print fmt = function
let string_of p x =
let b = Buffer.create 100 in
let fmt = formatter_of_buffer b in
let out,flush,_newline,spaces =
pp_get_all_formatter_output_functions fmt () in
pp_set_all_formatter_output_functions fmt
~out ~flush ~newline:(fun () -> spaces 1) ~spaces;
fprintf fmt "%a@?" p x;
Buffer.contents b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment