Skip to content

Commit

Permalink
Match hyphen in multi-revision comment matchers
Browse files Browse the repository at this point in the history
Currently, the matcher `//[rev-foo,rev-bar]~` does not get selected by
the regex. Change the matcher to also match strings that contain a `-`.h
  • Loading branch information
tgross35 committed Apr 19, 2024
1 parent d1a0fa5 commit 23fea67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ fn parse_expected(
// //[rev1]~
// //[rev1,rev2]~^^
static RE: Lazy<Regex> =
Lazy::new(|| Regex::new(r"//(?:\[(?P<revs>[\w,]+)])?~(?P<adjust>\||\^*)").unwrap());
Lazy::new(|| Regex::new(r"//(?:\[(?P<revs>[\w\-,]+)])?~(?P<adjust>\||\^*)").unwrap());

let captures = RE.captures(line)?;

Expand Down

0 comments on commit 23fea67

Please sign in to comment.