Skip to content

Commit 50da048

Browse files
authored
ocamldoc, manpage backend: unwrap module comment docstrings (#2114)
* unwrap non-code doctstring * use .SS for ocamldoc titles * update Changes
1 parent fcb68de commit 50da048

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Changes

+3
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ Working version
335335
- GPR#2105: Change verbatim to caml_example in documentation
336336
(Maxime Flin, review by Florian Angeletti)
337337

338+
- GPR#2114: ocamldoc, improved manpages for documentation inside modules
339+
(Florian Angeletti, review by Gabriel Scherer)
340+
338341
### Compiler distribution build system:
339342

340343
- GPR#1776: add -no-install-bytecode-programs and related configure options to

ocamldoc/odoc_man.ml

+4-3
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ class man =
319319
self#man_of_text2 b t;
320320
bs b "\n.sp\n"
321321
| Odoc_info.Title (_, _, t) ->
322-
self#man_of_text2 b [Odoc_info.Code (Odoc_info.string_of_text t)]
322+
let txt = Odoc_info.string_of_text t in
323+
bp b ".SS %s\n" txt
323324
| Odoc_info.Latex _ ->
324325
(* don't care about LaTeX stuff in HTML. *)
325326
()
@@ -810,13 +811,13 @@ class man =
810811
(** Print groff string for a module comment.*)
811812
method man_of_module_comment b text =
812813
bs b "\n.PP\n";
813-
self#man_of_text b [Code ("=== "^(Odoc_misc.string_of_text text)^" ===")];
814+
self#man_of_text b text;
814815
bs b "\n.PP\n"
815816

816817
(** Print groff string for a class comment.*)
817818
method man_of_class_comment b text =
818819
bs b "\n.PP\n";
819-
self#man_of_text b [Code ("=== "^(Odoc_misc.string_of_text text)^" ===")];
820+
self#man_of_text b text;
820821
bs b "\n.PP\n"
821822

822823
method man_of_recfield b modname f =

0 commit comments

Comments
 (0)