From 82f2f028fa1a2545de997da6f27fafed92671064 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 26 May 2023 21:47:47 +0200 Subject: [PATCH] fixed line counts ignoring newlines after a // comment --- mers/src/parsing/file.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mers/src/parsing/file.rs b/mers/src/parsing/file.rs index e4594e7..a5cc649 100755 --- a/mers/src/parsing/file.rs +++ b/mers/src/parsing/file.rs @@ -56,7 +56,11 @@ impl File { Some('/') => match chs.next() { Some('/') => loop { match chs.next() { - Some('\n') | None => break, + Some('\n') => { + data.push('\n'); + break; + } + None => break, _ => (), } },