From 0a67beb76fb1c500dd7ef56c064ef6f6a09e96aa Mon Sep 17 00:00:00 2001 From: Mohammad Kanaan Date: Mon, 27 Jul 2026 13:03:14 +0300 Subject: [PATCH] fix: line numbers now start at 1 --- src/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser.rs b/src/parser.rs index 43d2df6..b4d2e7e 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -6,7 +6,7 @@ use std::{ use anyhow::Context; use regex::Regex; -use crate::matches::{self, Match, Matches}; +use crate::matches::{Match, Matches}; pub fn read_lines( file_path: &str, @@ -42,7 +42,7 @@ pub fn match_pattern( if reg.is_match(&line) { let m = Match { - line_number: idx, + line_number: idx + 1, text: line, file_name: get_file_name_from_path(file_path), };