Ocamldoc: erase empty constructor comment
When a type definition exposes constructors, adding an empty constructor comment just after the last constructor is the only way to place a documentation comment after the type definition and still attach this comment to the type definition. However, this empty comment is still printed by most documentation generators. To fix this aesthetic conundrum, this commit erases empty constructor comments when constructing the associated Odoc_type.variant_constructor and thus prevents any printing of these empty comments.master
parent
6533f3bc06
commit
9b161ab1ad
|
@ -288,7 +288,9 @@ module Analyser =
|
|||
let f {Types.cd_id=constructor_name;cd_args;cd_res=ret_type} =
|
||||
let constructor_name = Ident.name constructor_name in
|
||||
let comment_opt =
|
||||
try List.assoc constructor_name name_comment_list
|
||||
try match List.assoc constructor_name name_comment_list with
|
||||
| Some { i_desc = None | Some []; _ } -> None
|
||||
| x -> x
|
||||
with Not_found -> None
|
||||
in
|
||||
let vc_args =
|
||||
|
|
Loading…
Reference in New Issue