aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/makefile/input.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/makefile/input.rs b/src/makefile/input.rs
index e2bff65..e88314d 100644
--- a/src/makefile/input.rs
+++ b/src/makefile/input.rs
@@ -408,7 +408,7 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> {
fn next_line(&mut self, settings: NextLineSettings) -> Option<(usize, Result<String>)> {
lazy_static! {
- static ref COMMENT: Regex = Regex::new(r"([^\\]|^)#.*$").unwrap();
+ static ref COMMENT: Regex = Regex::new(r"(^|[^\\])#.*$").unwrap();
}
let escaped_newline_replacement = settings.escaped_newline_replacement;
if let Some((line_number, line)) = self.pending_line.take() {