@@ -3,105 +3,104 @@ type t = k
33
44 Block delimiters should be on their own line:
55 {[
6- let x = 1
6+ let x = 1
77 ]}
88
99 As of odoc 2.1, a block can carry metadata:
1010 {@ocaml[
11- let x = 2
11+ let x = 2
1212 ]}
1313
1414 An OCaml block that should break:
1515 {[
16- let x = 2 in
17- x + x
16+ let x = 2 in
17+ x + x
1818 ]}
1919
2020 A toplevel phrase with no output:
2121 {[
22- # let x = 2 and y = 3 in
23- x + y
24- ;;
22+ # let x = 2 and y = 3 in
23+ x + y
24+ ;;
2525 ]}
2626
2727 A toplevel phrase with output:
2828 {@ocaml[
29- # let x = 2;;
30- val x : int = 2
29+ # let x = 2;;
30+ val x : int = 2
3131 ]}
3232
3333 Many toplevel phrases without output:
3434 {[
35- # let x = 2;;
36- # x + 2;;
37- # let x = 2 and y = 3 in
38- x + y
39- ;;
35+ # let x = 2;;
36+ # x + 2;;
37+ # let x = 2 and y = 3 in
38+ x + y
39+ ;;
4040 ]}
4141
4242 Many toplevel phrases with output:
4343 {[
44- # let x = 2;;
45- val x : int = 2
46- # x + 2;;
47- - : int = 4
48- # let x = 2 and y = 3 in
49- x + y
50- ;;
44+ # let x = 2;;
45+ val x : int = 2
46+ # x + 2;;
47+ - : int = 4
48+ # let x = 2 and y = 3 in
49+ x + y
50+ ;;
5151 ]}
5252
5353 Output are printed after a newline:
5454 {[
55- # let x = 2;; val x : int = 2
56- # let x = 3;;
57- # let x = 4;; val x : int = 4
55+ # let x = 2;; val x : int = 2
56+ # let x = 3;;
57+ # let x = 4;; val x : int = 4
5858 ]}
5959
6060 Excessive linebreaks are removed:
6161 {[
62- # let x = 2 in
63- x + 1
64- ;;
62+
63+ # let x = 2 in x+1;;
64+
6565 output
66- # let y = 3 in
67- y + 1
68- ;;
66+
67+ # let y = 3 in y+1;;
6968 ]}
7069
7170 Linebreak after `#`:
7271 {[
73- # let x = 2 in
74- x + 1
75- ;;
72+ # let x = 2 in
73+ x + 1
74+ ;;
7675 ]} *)
7776
7877(** INVALID BLOCKS: The formatting of invalid blocks is preserved.
7978
8079 Invalid toplevel phrase/ocaml block:
8180 {[
82- - : int =
83- 4
81+ - : int =
82+ 4
8483 ]}
8584
8685 Output before a toplevel phrase:
8786 {[
88- - : int = 4
89- # 2+2;;
87+ - : int = 4
88+ # 2+2;;
9089 ]}
9190
9291 No `;;` at the end of the phrase, no output:
9392 {[
94- # let x = 2 in x+1
93+ # let x = 2 in x+1
9594 ]}
9695
9796 No `;;` at the end of the phrase, with output:
9897 {[
99- # let x = 2 in x+1
100- some output
98+ # let x = 2 in x+1
99+ some output
101100 ]}
102101
103102 Multiple phrases without `;;` at the end:
104103 {[
105- # let x = 2 in x+1
106- # let x = 4 in x+1
104+ # let x = 2 in x+1
105+ # let x = 4 in x+1
107106 ]} *)
0 commit comments