diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-13 22:14:48 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-13 22:14:48 -0600 |
commit | b98e68d3ba7575e147856e0ec6b85869b7c273e0 (patch) | |
tree | 471f0b50600a07088cabed91bdc4700c09ccae22 | |
parent | cc1285d816c00104e3aa1c5f43437a68a85e0f34 (diff) | |
download | makers-b98e68d3ba7575e147856e0ec6b85869b7c273e0.tar.gz makers-b98e68d3ba7575e147856e0ec6b85869b7c273e0.zip |
prefer a full-line comment to a partial-line comment given the choice
-rw-r--r-- | src/makefile/input.rs | 2 |
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() { |