We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 483a0a5 commit 456008cCopy full SHA for 456008c
ci/date-check/src/main.rs
@@ -38,10 +38,18 @@ impl fmt::Display for Date {
38
39
fn make_date_regex() -> Regex {
40
Regex::new(
41
- r"(?x)
42
- (?:<!--\s+date-check:\s+(\D+)\s+(\d{4})\s+-->)
+ r"(?x) # insignificant whitespace mode
+ (<!--\s*
43
+ date-check:\s*
44
+ (?P<m1>\D+)\s+
45
+ (?P<y1>\d{4})\s*-->
46
+ )
47
|
- (?:<!--\s+date-check\s+-->\s+(\D+)\s+(\d{4})\b)
48
49
+ date-check\s*-->\s+
50
+ (?P<m2>\D+)\s+
51
+ (?P<y2>\d{4})\b
52
53
",
54
)
55
.unwrap()
0 commit comments