@@ -48,7 +48,12 @@ let extract_code_block_info acc ~(location : Lexing.position) ~docstring =
4848 }
4949 in
5050 fun location
51- { O.Ast. meta; delimiter; content = { O.Loc. location = span ; value } ; output } ->
51+ {
52+ O.Ast. meta;
53+ delimiter;
54+ content = { O.Loc. location = span ; value } ;
55+ output;
56+ } ->
5257 let metadata =
5358 Option. map
5459 (fun { O.Ast. language; tags } ->
@@ -59,11 +64,13 @@ let extract_code_block_info acc ~(location : Lexing.position) ~docstring =
5964 in
6065 let content = convert_loc span in
6166 let code_block = convert_loc location in
62- let output = Option. map (List. fold_left fold_fn [] )
63- (output :> O.Ast.block_element O.Ast.with_location list option ) in
67+ let output =
68+ Option. map
69+ (List. fold_left fold_fn [] )
70+ (output :> O.Ast.block_element O.Ast.with_location list option )
71+ in
6472 let output = Option. value ~default: [] output in
65- { metadata; delimiter; content; content_txt = value; code_block; output }
66-
73+ { metadata; delimiter; content; content_txt = value; code_block; output }
6774 (* Fold over the results from odoc-parser, recurse where necessary
6875 and extract the code block metadata *)
6976 and fold_fn acc (elt : O.Ast.block_element O.Loc.with_location ) =
@@ -145,7 +152,7 @@ let slice_error (code_block : Code_block.t) =
145152 match code_block.output with
146153 | [] -> []
147154 | [ x ] -> x.content_txt |> output_of_line |> fun x -> [ x ]
148- | _ -> assert false
155+ | _ -> assert false
149156
150157(* Given code block metadata and the original file, this function splices the
151158 contents of the code block from the original text and creates an Mdx
0 commit comments