We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf0e151 commit e1dde3cCopy full SHA for e1dde3c
ci/date-check/src/main.rs
@@ -39,7 +39,7 @@ fn make_date_regex() -> Regex {
39
Regex::new(
40
r"(?x) # insignificant whitespace mode
41
<!--\s*
42
- date:\s*
+ [dD]ate:\s*
43
(?P<y>\d{4}) # year
44
-
45
(?P<m>\d{2}) # month
@@ -186,6 +186,12 @@ mod tests {
186
assert!(regex.is_match("foo <!-- date: 2021-01 --> bar"));
187
}
188
189
+ #[test]
190
+ fn test_date_regex_capitalized() {
191
+ let regex = make_date_regex();
192
+ assert!(regex.is_match("foo <!-- Date: 2021-08 --> bar"));
193
+ }
194
+
195
#[test]
196
fn test_collect_dates_from_file() {
197
let text = "Test1\n<!-- date: 2021-01 -->\nTest2\nFoo<!-- date: 2021-02 \
0 commit comments