From 6a8a04c0762e9d0c1ee357973486015a2522672d Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 4 Apr 2021 11:58:06 -0600 Subject: let % in patterns match *anything* --- src/makefile/pattern.rs | 4 ++-- 1 file 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 { // 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())); -- cgit v1.2.3