aboutsummaryrefslogtreecommitdiff
path: root/src/makefile
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-13 22:14:48 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-13 22:14:48 -0600
commitb98e68d3ba7575e147856e0ec6b85869b7c273e0 (patch)
tree471f0b50600a07088cabed91bdc4700c09ccae22 /src/makefile
parentcc1285d816c00104e3aa1c5f43437a68a85e0f34 (diff)
downloadmakers-b98e68d3ba7575e147856e0ec6b85869b7c273e0.tar.gz
makers-b98e68d3ba7575e147856e0ec6b85869b7c273e0.zip
prefer a full-line comment to a partial-line comment given the choice
Diffstat (limited to 'src/makefile')
-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() {