Skip to content

Commit 456008c

Browse files
tshepangcamelid
andauthored
accept review suggestion
Co-authored-by: Noah Lev <[email protected]>
1 parent 483a0a5 commit 456008c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

ci/date-check/src/main.rs

+11-3
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,18 @@ impl fmt::Display for Date {
3838

3939
fn make_date_regex() -> Regex {
4040
Regex::new(
41-
r"(?x)
42-
(?:<!--\s+date-check:\s+(\D+)\s+(\d{4})\s+-->)
41+
r"(?x) # insignificant whitespace mode
42+
(<!--\s*
43+
date-check:\s*
44+
(?P<m1>\D+)\s+
45+
(?P<y1>\d{4})\s*-->
46+
)
4347
|
44-
(?:<!--\s+date-check\s+-->\s+(\D+)\s+(\d{4})\b)
48+
(<!--\s*
49+
date-check\s*-->\s+
50+
(?P<m2>\D+)\s+
51+
(?P<y2>\d{4})\b
52+
)
4553
",
4654
)
4755
.unwrap()

0 commit comments

Comments
 (0)