From 45529cca7626677416c8d6048b5de8f4ff615fb8 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Mon, 5 Apr 2021 11:35:57 -0600 Subject: yeet spaces before a comment alongside the comment --- src/makefile/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/makefile') diff --git a/src/makefile/input.rs b/src/makefile/input.rs index b828829..3fe28e7 100644 --- a/src/makefile/input.rs +++ b/src/makefile/input.rs @@ -298,7 +298,7 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> { lazy_static! { static ref COMMENT: Regex = Regex::new("#.*$").unwrap(); } - let line = COMMENT.replace(&line, "").into_owned(); + let line = COMMENT.replace(&line, "").trim_end().to_owned(); // handle escaped newlines let mut line_pieces = vec![line]; -- cgit v1.2.3