File tree Expand file tree Collapse file tree 4 files changed +16
-5
lines changed
Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ let parse_attribute : Parsetree.attribute -> parsed_attribute option =
9292 | Some p -> Some (`Text p)
9393 | None -> None )
9494 | "doc" | "ocaml.doc" -> (
95+ (* We don't expect a stop-comment here. *)
9596 match load_payload attr_payload with
9697 | Some p -> Some (`Doc p)
9798 | None -> None )
@@ -211,8 +212,9 @@ let extract_top_comment internal_tags ~classify parent items =
211212 let p = match p with Some (p , _ ) -> Some p | None -> None in
212213 let attr_loc = read_location attr_loc in
213214 `Alert (Location_. at attr_loc (`Tag (`Alert (name, p))))
214- | Some (`Stop _ ) | None -> `Skip )
215- | Some `Open -> `Skip
215+ | Some (`Stop _ ) -> `Return (* Stop at stop-comments. *)
216+ | None -> `Skip (* Skip unrecognized attributes. *) )
217+ | Some `Open -> `Skip (* Skip open statements *)
216218 | None -> `Return
217219 in
218220 let rec extract_tail_alerts acc = function
Original file line number Diff line number Diff line change 1212 </ nav >
1313 < header class ="odoc-preamble ">
1414 < h1 > Module < code > < span > Stop.P</ span > </ code > </ h1 > < p > Doc.</ p >
15- </ header > < div class ="odoc-content "> </ div >
15+ </ header >
16+ < div class ="odoc-content ">
17+ < div class ="odoc-spec ">
18+ < div class ="spec value anchored " id ="val-bar ">
19+ < a href ="#val-bar " class ="anchor "> </ a >
20+ < code > < span > < span class ="keyword "> val</ span > bar : int</ span > </ code >
21+ </ div >
22+ </ div >
23+ </ div >
1624 </ body >
1725</ html >
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ \section{Module \ocamlinlinecode{Stop}}\label{module-Stop}%
2020\ocamlcodefragment {\ocamltag {keyword}{end}}\\
2121The top-comment computation must not mess with stop comments.
2222
23- \label {module-Stop-module-P }\ocamlcodefragment {\ocamltag {keyword}{module} \hyperref [module-Stop-module-P]{\ocamlinlinecode {P}}}\ocamlcodefragment { : \ocamltag {keyword}{sig}}\begin {ocamlindent }\end {ocamlindent }%
23+ \label {module-Stop-module-P }\ocamlcodefragment {\ocamltag {keyword}{module} \hyperref [module-Stop-module-P]{\ocamlinlinecode {P}}}\ocamlcodefragment { : \ocamltag {keyword}{sig}}\begin {ocamlindent }\label {module-Stop-module-P-val-bar }\ocamlcodefragment {\ocamltag {keyword}{val} bar : int}\\
24+ \end {ocamlindent }%
2425\ocamlcodefragment {\ocamltag {keyword}{end}}\begin {ocamlindent }Doc.\end {ocamlindent }%
2526\medbreak
2627
Original file line number Diff line number Diff line change 1414.SH Documentation
1515.sp
1616.nf
17-
17+ \f[CB] val \fR bar : int
You can’t perform that action at this time.
0 commit comments