@@ -2088,6 +2088,10 @@ fn main() {
2088
2088
run_test ( "12) foo" , "foo" , 4 , "12) " , " " ) ;
2089
2089
2090
2090
run_test ( " - foo" , "foo" , 6 , " - " , " " ) ;
2091
+
2092
+ // https://spec.commonmark.org/0.30 says: "A start number may begin with 0s":
2093
+ run_test ( "0. foo" , "foo" , 3 , "0. " , " " ) ;
2094
+ run_test ( "01. foo" , "foo" , 4 , "01. " , " " ) ;
2091
2095
}
2092
2096
2093
2097
#[ test]
@@ -2108,9 +2112,20 @@ fn main() {
2108
2112
// 1868. He was buried in...
2109
2113
// ```
2110
2114
"123. only 2-digit numbers are recognized as item markers." ,
2111
- // Parens.
2115
+ // Parens:
2112
2116
"123) giving some coverage to parens as well." ,
2113
2117
"a) giving some coverage to parens as well." ,
2118
+ // https://spec.commonmark.org/0.30 says that "at least one space or tab is needed
2119
+ // between the list marker and any following content":
2120
+ "1.Not a list item." ,
2121
+ "1.2.3. Not a list item." ,
2122
+ "1)Not a list item." ,
2123
+ "-Not a list item." ,
2124
+ "+Not a list item." ,
2125
+ "+1 not a list item." ,
2126
+ // https://spec.commonmark.org/0.30 says: "A start number may not be negative":
2127
+ "-1. Not a list item." ,
2128
+ "-1 Not a list item." ,
2114
2129
] ;
2115
2130
for line in test_inputs. iter ( ) {
2116
2131
let maybe_block = ItemizedBlock :: new ( line) ;
0 commit comments