File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -131,9 +131,9 @@ let lstrip string =
131131
132132let pp_contents ?syntax ppf t =
133133 match (syntax, t.contents) with
134- | Some Syntax. Mli , [ _ ] -> Fmt. pf ppf " %s" ( String. concat " \n " t.contents)
135- | Some Syntax. Mli , _ ->
136- Fmt. pf ppf " \n %a" (pp_lines syntax t) (List. map lstrip t.contents )
134+ | Some Syntax. Mli , [ line ] -> Fmt. pf ppf " %s" line
135+ | Some Syntax. Mli , lines ->
136+ Fmt. pf ppf " @ \n %a@ \n " (pp_lines syntax t) (List. map lstrip lines )
137137 | (Some Cram | Some Normal | None ), [] -> ()
138138 | (Some Cram | Some Normal | None ), _ ->
139139 Fmt. pf ppf " %a\n " (pp_lines syntax t) t.contents
@@ -146,10 +146,9 @@ let pp_errors ppf t =
146146 Fmt. string ppf " ```\n "
147147 | _ -> ()
148148
149- let pp_footer ?syntax ppf t =
149+ let pp_footer ?syntax ppf _ =
150150 match syntax with
151- | Some Syntax. Mli ->
152- if List. length t.contents = 1 then Fmt. pf ppf " " else Fmt. pf ppf " \n "
151+ | Some Syntax. Mli -> ()
153152 | Some Syntax. Cram -> ()
154153 | _ -> Fmt. string ppf " ```\n "
155154
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ let run_cram_tests ?syntax t ?root ppf temp_file pad tests =
118118 output;
119119 Cram. pp_exit_code ~pad ppf n)
120120 tests;
121- match syntax with Some Syntax. Mli -> () | _ -> Block. pp_footer ?syntax ppf t
121+ Block. pp_footer ?syntax ppf t
122122
123123let eval_test ?block ?root c cmd =
124124 Log. debug (fun l -> l " eval_test %a" Fmt. (Dump. list (Fmt. fmt " %S" )) cmd);
@@ -197,7 +197,7 @@ let run_toplevel_tests ?syntax ?root c ppf tests t =
197197 Output. pp ~pad ppf (`Output line))
198198 output)
199199 tests;
200- match syntax with Some Syntax. Mli -> () | _ -> Block. pp_footer ?syntax ppf t
200+ Block. pp_footer ?syntax ppf t
201201
202202type file = { first : Mdx.Part .file ; current : Mdx.Part .file }
203203
You can’t perform that action at this time.
0 commit comments