@@ -1537,8 +1537,8 @@ let%expect_test _ =
1537
1537
(((f.ml (1 0) (1 5))
1538
1538
(paragraph (((f.ml (1 0) (1 5)) (simple ((f.ml (1 2) (1 5)) foo) ())))))))
1539
1539
(warnings
1540
- ( "File \"f.ml\", line 1, characters 5 -5:\
1541
- \nEnd of text is not allowed in '{!...}' (cross-reference) ."))) |}]
1540
+ ( "File \"f.ml\", line 1, characters 0 -5:\
1541
+ \nOpen bracket '{!' is never closed ."))) |}]
1542
1542
1543
1543
let empty_kind =
1544
1544
test "{!:foo}";
@@ -1647,8 +1647,8 @@ let%expect_test _ =
1647
1647
(paragraph
1648
1648
(((f.ml (1 0) (1 9)) (simple ((f.ml (1 2) (1 9)) val:foo) ())))))))
1649
1649
(warnings
1650
- ( "File \"f.ml\", line 1, characters 9 -9:\
1651
- \nEnd of text is not allowed in '{!...}' (cross-reference) ."))) |}]
1650
+ ( "File \"f.ml\", line 1, characters 0 -9:\
1651
+ \nOpen bracket '{!' is never closed ."))) |}]
1652
1652
1653
1653
let operator =
1654
1654
test "{!(>>=)}";
@@ -1720,17 +1720,27 @@ let%expect_test _ =
1720
1720
(((f.ml (1 0) (1 6)) (simple ((f.ml (1 2) (1 6)) "\"}\"") ())))))))
1721
1721
(warnings ())) |}]
1722
1722
1723
+ let operator_with_curly_braces =
1724
+ test "{!( } )}";
1725
+ [%expect
1726
+ {|
1727
+ ((output
1728
+ (((f.ml (1 0) (1 8))
1729
+ (paragraph
1730
+ (((f.ml (1 0) (1 8)) (simple ((f.ml (1 2) (1 8)) "( } )") ())))))))
1731
+ (warnings ())) |}]
1732
+
1723
1733
let operator_unbalanced =
1724
1734
test "{!(.*()}";
1725
1735
[%expect
1726
1736
{|
1727
1737
((output
1728
1738
(((f.ml (1 0) (1 8))
1729
1739
(paragraph
1730
- (((f.ml (1 0) (1 8)) (simple ((f.ml (1 2) (1 8)) "(.*()") ())))))))
1740
+ (((f.ml (1 0) (1 8)) (simple ((f.ml (1 2) (1 8)) "(.*()} ") ())))))))
1731
1741
(warnings
1732
- ( "File \"f.ml\", line 1, characters 8 -8:\
1733
- \n'}' (end of reference) is not allowed in '(.*()' (custom operator) ."))) |}]
1742
+ ( "File \"f.ml\", line 1, characters 2 -8:\
1743
+ \nOpen bracket '(' is never closed ."))) |}]
1734
1744
1735
1745
let operator_eof =
1736
1746
test "{!(.*()";
@@ -1741,8 +1751,8 @@ let%expect_test _ =
1741
1751
(paragraph
1742
1752
(((f.ml (1 0) (1 7)) (simple ((f.ml (1 2) (1 7)) "(.*()") ())))))))
1743
1753
(warnings
1744
- ( "File \"f.ml\", line 1, characters 7 -7:\
1745
- \nEnd of text is not allowed in '{!...}' (cross-reference) ."))) |}]
1754
+ ( "File \"f.ml\", line 1, characters 2 -7:\
1755
+ \nOpen bracket '(' is never closed ."))) |}]
1746
1756
end in
1747
1757
()
1748
1758
@@ -1933,8 +1943,8 @@ let%expect_test _ =
1933
1943
(paragraph
1934
1944
(((f.ml (1 0) (1 6)) (with_text ((f.ml (1 3) (1 6)) foo) ())))))))
1935
1945
(warnings
1936
- ( "File \"f.ml\", line 1, characters 6 -6:\
1937
- \nEnd of text is not allowed in '{{!...} ...}' (cross-reference) ."
1946
+ ( "File \"f.ml\", line 1, characters 0 -6:\
1947
+ \nOpen bracket '{{!' is never closed ."
1938
1948
"File \"f.ml\", line 1, characters 6-6:\
1939
1949
\nEnd of text is not allowed in '{{!...} ...}' (cross-reference)."
1940
1950
"File \"f.ml\", line 1, characters 0-6:\
@@ -2102,8 +2112,8 @@ let%expect_test _ =
2102
2112
{|
2103
2113
((output (((f.ml (1 0) (1 6)) (paragraph (((f.ml (1 0) (1 6)) (foo ())))))))
2104
2114
(warnings
2105
- ( "File \"f.ml\", line 1, characters 6 -6:\
2106
- \nEnd of text is not allowed in '{{:...} ...}' (external link) ."
2115
+ ( "File \"f.ml\", line 1, characters 0 -6:\
2116
+ \nOpen bracket '{{:' is never closed ."
2107
2117
"File \"f.ml\", line 1, characters 6-6:\
2108
2118
\nEnd of text is not allowed in '{{:...} ...}' (external link)."))) |}]
2109
2119
@@ -2120,8 +2130,8 @@ let%expect_test _ =
2120
2130
{|
2121
2131
((output (((f.ml (1 0) (1 5)) (paragraph (((f.ml (1 0) (1 5)) (foo ())))))))
2122
2132
(warnings
2123
- ( "File \"f.ml\", line 1, characters 5 -5:\
2124
- \nEnd of text is not allowed in '{:...} (external link)' ."))) |}]
2133
+ ( "File \"f.ml\", line 1, characters 0 -5:\
2134
+ \nOpen bracket '{:' is never closed ."))) |}]
2125
2135
2126
2136
let empty_single_braces =
2127
2137
test "{:}";
0 commit comments