diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-04 11:58:06 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-04 11:58:06 -0600 |
commit | 6a8a04c0762e9d0c1ee357973486015a2522672d (patch) | |
tree | b79687adc3348284a97350d2f1026dd6da7ac27e | |
parent | f326eef2c9c827935a27de16748abe5e253b9979 (diff) | |
download | makers-6a8a04c0762e9d0c1ee357973486015a2522672d.tar.gz makers-6a8a04c0762e9d0c1ee357973486015a2522672d.zip |
let % in patterns match *anything*
-rw-r--r-- | src/makefile/pattern.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/makefile/pattern.rs b/src/makefile/pattern.rs index 9c5a0fa..8d94dea 100644 --- a/src/makefile/pattern.rs +++ b/src/makefile/pattern.rs @@ -9,14 +9,14 @@ fn compile_pattern(pattern: &str) -> Result<Regex> { // We end with two backslashes, so this is an escaped backslash and then an // unescaped wildcard. result = real_result.to_owned(); - result.push_str(r"\\(\w*)"); + result.push_str(r"\\(.*)"); } else if let Some(real_result) = result.strip_suffix(r"\\") { // We end with one backslash, so this is an escaped wildcard. result = real_result.to_owned(); result.push('%'); } else { // We don't end with a backslash, so this is an unescaped wildcard. - result.push_str(r"(\w*)"); + result.push_str(r"(.*)"); } } else { result.push_str(®ex::escape(&c.to_string())); |