Skip to content

Commit 48556d9

Browse files
committed
generalize the regex to support windows paths
Hopefully this won't get us into trouble. We could make platform dependent paths if needed.
1 parent 3b48394 commit 48556d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/formality-core/src/test_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use std::fmt::{Debug, Display};
4141
/// with `"src/file.rs:LL:CC"`. This makes error messages resilient against changes to the source code.
4242
pub fn normalize_paths(s: impl Display) -> String {
4343
let s = s.to_string();
44-
let re = regex::Regex::new(r"\([^():]+.rs:\d+:\d+\)").unwrap();
44+
let re = regex::Regex::new(r"\([^()]+.rs:\d+:\d+\)").unwrap();
4545
re.replace_all(&s, "(src/file.rs:LL:CC)").to_string()
4646
}
4747

0 commit comments

Comments
 (0)