From 3b7b24adc88e5e26670afa1f94106cb361060a67 Mon Sep 17 00:00:00 2001 From: Nigel Date: Fri, 1 Dec 2023 15:44:06 +0000 Subject: [PATCH] Handle "see also" as well as "also see" in index When cross-referencing, previous work only checked for either "see" or "also see". This commit adds "see also". Fixes #1285 --- CHANGELOG.md | 6 +++--- src/lib/Guiguts/HTMLConvert.pm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1c5f60d..3f7b8899 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,9 @@ ## Version 1.6.1 -- New 'Add Index Cross-references' feature links "See"/"Also see" references - to the relevant location in the index. References that cannot be linked - automatically are listed for manual linking +- New 'Add Index Cross-references' feature links "See"/"Also see"/"See also" + references to the relevant location in the index. References that cannot be + linked automatically are listed for manual linking - Several tools added to support LaTeX/HTML/SVG workflow - CP Character Substitutions now include `¬` -> `-` - Bad words are loaded when good words file is loaded diff --git a/src/lib/Guiguts/HTMLConvert.pm b/src/lib/Guiguts/HTMLConvert.pm index 39802fea..db349233 100644 --- a/src/lib/Guiguts/HTMLConvert.pm +++ b/src/lib/Guiguts/HTMLConvert.pm @@ -4248,7 +4248,7 @@ sub indexxref { $textwindow->markSet( 'indexendmark', $indexend ); # Since row/col of indexend will change during insertions my $indexstart = pop(@ranges); - my $SEESTR = '(also )*see'; # Change this if needed for different languages + my $SEESTR = '(also )?see( also)?'; # Change this if needed for different languages my $SEESTRLEN = length($SEESTR); # Approx length just used for advancing search position my $seepos = $indexstart; my $seesawnum = 1;