Skip to content

Commit

Permalink
accept review suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: Noah Lev <[email protected]>
  • Loading branch information
tshepang and camelid authored Aug 2, 2022
1 parent 483a0a5 commit 456008c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ci/date-check/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,18 @@ impl fmt::Display for Date {

fn make_date_regex() -> Regex {
Regex::new(
r"(?x)
(?:<!--\s+date-check:\s+(\D+)\s+(\d{4})\s+-->)
r"(?x) # insignificant whitespace mode
(<!--\s*
date-check:\s*
(?P<m1>\D+)\s+
(?P<y1>\d{4})\s*-->
)
|
(?:<!--\s+date-check\s+-->\s+(\D+)\s+(\d{4})\b)
(<!--\s*
date-check\s*-->\s+
(?P<m2>\D+)\s+
(?P<y2>\d{4})\b
)
",
)
.unwrap()
Expand Down

0 comments on commit 456008c

Please sign in to comment.