@@ -183,8 +183,7 @@ let update_config_maybe_disabled c loc l f =
183183
184184let update_config_maybe_disabled_attrs c loc attrs f =
185185 let l = attrs.attrs_before @ attrs.attrs_after in
186- let c = update_config c l in
187- maybe_disabled c loc l f
186+ update_config_maybe_disabled c loc l f
188187
189188let update_config_maybe_disabled_block c loc l f =
190189 let fmt bdy = {empty with opn= Some (open_vbox 2 ); bdy; cls= close_box} in
@@ -476,9 +475,10 @@ let extract_doc_attrs acc attrs =
476475 [doc-comments] and [doc-comment-tag-only] options Returns the tuple
477476 [doc_before, doc_after, attrs] *)
478477let fmt_docstring_around_item ?is_val ?force_before ?fit c attrs =
479- let docs, attrs = extract_doc_attrs [] attrs in
478+ let doc1, attrs = doc_atrs attrs in
479+ let doc2, attrs = doc_atrs attrs in
480480 let doc_before, doc_after =
481- fmt_docstring_around_item' ?is_val ?force_before ?fit c docs
481+ fmt_docstring_around_item' ?is_val ?force_before ?fit c doc1 doc2
482482 in
483483 (doc_before, doc_after, attrs)
484484
@@ -3424,7 +3424,14 @@ and fmt_type_exception ~pre c ctx
34243424 let docs, attrs_before = extract_doc_attrs [] item_attrs.attrs_before in
34253425 let docs, attrs_after = extract_doc_attrs docs item_attrs.attrs_after in
34263426 let docs, cons_attrs = extract_doc_attrs docs cons_attrs in
3427- let doc_before, doc_after = fmt_docstring_around_item' c docs in
3427+ let doc1, doc2 =
3428+ match docs with
3429+ | [] -> (None , None )
3430+ | [elt] -> (Some elt, None )
3431+ | [doc1; doc2] -> (Some doc1, Some doc2)
3432+ | _ -> assert false
3433+ in
3434+ let doc_before, doc_after = fmt_docstring_around_item' c doc1 doc2 in
34283435 let ptyexn_constructor =
34293436 {ptyexn_constructor with pext_attributes= cons_attrs}
34303437 in
0 commit comments