From 53b7796a5ac47a6bea5593db18fb9ef0cde8b14b Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Mon, 22 Jul 2019 10:49:20 +0200 Subject: [PATCH] Normalize whitespaces inside code spans --- src/Fmt_odoc.ml | 2 +- test/passing/doc_comments.mli.ref | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Fmt_odoc.ml b/src/Fmt_odoc.ml index 3d5f047407..fd405b2554 100644 --- a/src/Fmt_odoc.ml +++ b/src/Fmt_odoc.ml @@ -145,7 +145,7 @@ let rec fmt_inline_element : inline_element -> Fmt.t = function escape $ str_normalized w | `Code_span s -> let s = escape_brackets s in - hovbox 0 (wrap "[" "]" (str s)) + hovbox 0 (wrap "[" "]" (str_normalized s)) | `Raw_markup (lang, s) -> let lang = match lang with diff --git a/test/passing/doc_comments.mli.ref b/test/passing/doc_comments.mli.ref index 5290ba80e2..22217d754f 100644 --- a/test/passing/doc_comments.mli.ref +++ b/test/passing/doc_comments.mli.ref @@ -330,9 +330,9 @@ end (** {%html:

Raw markup

%} {%Without language%} {%other:Other language%} *) -(** [Multi - Line] +(** [Multi Line] - [ A lot of spaces ] + [A lot of spaces] - [Very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong] *) + [Very + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong] *)