From eb10cbf4107afd90a74f68b16d32e33bc6726d58 Mon Sep 17 00:00:00 2001 From: Matthew Vernon Date: Sat, 21 Aug 2021 13:55:25 +0100 Subject: [PATCH] Decrement $. when making concordance The previous fix to using the rawtext file (rather than the output of bible) correctly discarded the header line. It didn't, however, adjust $. (line count), which is used to build the concordance. So we need to store $. -1 in the concordance. Thanks to Christian Weisgerber for the report. --- makeconc.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makeconc.pl b/makeconc.pl index cf3edeb..6ccc32d 100755 --- a/makeconc.pl +++ b/makeconc.pl @@ -52,7 +52,8 @@ while () { next if $stopword{$word}; $count{$word}++; # Move below next line to count per-line. next if $seenonthisline{$word}++; - $lines{$word} .= " " . $.; + #the header line discard still leaves $. 1 higher than we want + $lines{$word} .= " " . ($. - 1); } } die $! if BIBLE->error(); -- 2.30.2