From 4bd736a5cd22a9f9dc9755b714643aedf6b6cd65 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Wed, 1 Jun 2022 16:42:25 +0200 Subject: [PATCH] [devguide] Fix handling of @plugin development guide for record fields --- doc/developer/check_api/.merlin | 1 + doc/developer/check_api/check_code.ml | 14 ++------------ 2 files changed, 3 insertions(+), 12 deletions(-) create mode 100644 doc/developer/check_api/.merlin diff --git a/doc/developer/check_api/.merlin b/doc/developer/check_api/.merlin new file mode 100644 index 00000000000..5812a793959 --- /dev/null +++ b/doc/developer/check_api/.merlin @@ -0,0 +1 @@ +PKG ocamldoc diff --git a/doc/developer/check_api/check_code.ml b/doc/developer/check_api/check_code.ml index 2962f1d064d..6f312d6779f 100644 --- a/doc/developer/check_api/check_code.ml +++ b/doc/developer/check_api/check_code.ml @@ -223,22 +223,12 @@ module Generator (G : Odoc_html.Html_generator) = struct super#html_of_exception b e method private print_record b father l = - last_type <- last_type ^ "{"; let print_one r = - if last_type <> "" && - String.get last_type ((String.length last_type) -1) = '{' - then begin - if r.Type.rf_mutable then last_type <- last_type ^ "mutable " - end else begin - if r.Type.rf_mutable then last_type <- last_type ^ "; mutable " - else last_type <- last_type ^ "; " - end; - last_type <- last_type ^ r.Type.rf_name ; - self#html_of_type_expr_3 b father r.Type.rf_type; + last_name <- father ^ "." ^ r.Type.rf_name; + last_type <- father ^ " -> " ^ Odoc_info.string_of_type_expr r.Type.rf_type; self#html_of_info b r.Type.rf_text in print_concat b "\n" print_one l; - last_type <- last_type ^ "}" method html_of_type b t = Odoc_info.reset_type_names (); -- GitLab