File tree Expand file tree Collapse file tree 3 files changed +122
-316
lines changed
test/integration/markdown.t Expand file tree Collapse file tree 3 files changed +122
-316
lines changed Original file line number Diff line number Diff line change
1
+ (* * Synopsis.
2
+
3
+ Rest of preamble. *)
4
+
5
+ (* * Floating comment at the top. *)
6
+
7
+ type t
8
+ (* * Doc for [type t]. *)
9
+
10
+ val x : t
11
+ (* * Doc for [val x]. *)
12
+
13
+ type a = t
14
+ (* * Type alias *)
15
+
16
+ (* * Doc for [type b]. *)
17
+ type b = A (* * Doc for [A]. *) | B (* * Doc for [B]. *)
18
+
19
+ type c = { a : int ; (* * Doc for [a]. *) b : int (* * Doc for [b]. *) }
20
+ (* * Doc for [type c]. *)
21
+
22
+ val y : [ `One (* * Doc for [`One]. *) | `Two (* * Doc for [`Two]. *) ]
23
+ (* * Polymorphic variant. *)
24
+
25
+ (* * Floating comment. *)
26
+
27
+ val z : t -> (t -> t ) -> foo :t -> ?bar : t -> [ `One of t ] -> t * t
28
+ (* * Type complicated enough to be rendered differently. *)
29
+
30
+ (* * Outer doc for [M]. *)
31
+ module M : sig
32
+ (* * Inner doc for [M]. *)
33
+
34
+ type t
35
+ end
36
+
37
+ module N : sig
38
+ (* * Doc for [N]. *)
39
+
40
+ type t
41
+ end
42
+
43
+ module type S = sig
44
+ (* * Doc for [S]. *)
45
+
46
+ type t
47
+ end
Original file line number Diff line number Diff line change 4
4
5
5
(* * arrow (->) in a doc comment *)
6
6
7
- val concat : string -> string -> string
8
-
9
7
(* * {%html:foo:bar%} : a raw markup *)
10
8
11
- type t
12
- (* * Doc for [type t]. *)
13
-
14
- type a = t
15
-
16
- type y'
17
-
18
- module type Foo' = sig
19
- type foo
20
- end
21
-
22
- module Bar : sig
23
- type bar
24
- end
25
-
26
- module type Bar' = sig
27
- type bar'
28
- end
29
-
30
- module type Foo = sig
31
- type foo
32
-
33
- include Bar '
34
-
35
- module type Foo' = sig
36
- type foo'
37
-
38
- type days = Mon (* * Docs for [days]. *)
39
-
40
- type num = [ `One (* * Docs for [`One]*) ]
41
- end
42
- end
43
-
44
- type other_names = { given : string ; nickname : string }
45
-
46
- type name = {
47
- fname : string ; (* * Docs for [fname] *)
48
- lname : string ;
49
- others : other_names ;
50
- }
51
-
52
9
(* * {2:foo Label} *)
53
10
54
11
(* * {{:href} test_two } *)
@@ -90,15 +47,6 @@ A numbered list:
90
47
@author David Sheets
91
48
*)
92
49
93
- (* * The end foo end keyword in doc comment. *)
94
- module Foo : sig
95
- type foo
96
-
97
- type poly = [ `Mon | `Tue ]
98
-
99
- type name = { fname : string ; lname : string }
100
- end
101
-
102
50
(* * p1 *)
103
51
104
52
(* * p2
121
69
{- Mon}
122
70
{- Tue}
123
71
} *)
72
+
You can’t perform that action at this time.
0 commit comments