diff view: translate \n to <br>

This commit is contained in:
Hannes Mehnert 2025-01-08 15:34:43 +01:00
parent 0567f58f05
commit 0a025adaae

View file

@ -827,9 +827,13 @@ let duniverse_diffs diffs =
let opam_diffs diffs = let opam_diffs diffs =
List.concat_map (fun pd -> List.concat_map (fun pd ->
let diff =
List.concat_map (fun line -> [ H.txt line ; H.br () ])
(String.split_on_char '\n' pd.Opamdiff.diff)
in
H.h4 [ txtf "%a" Opamdiff.pp_opam_diff pd ] :: H.h4 [ txtf "%a" Opamdiff.pp_opam_diff pd ] ::
H.h5 [ H.txt "diff" ] :: H.h5 [ H.txt "diff" ] ::
H.code [ H.txt pd.diff ; H.br () ] :: []) H.code diff :: [])
diffs diffs
let compare_builds let compare_builds