Not perfect, but better than it was (it used to show
a link to the Intro chapter).
my $primary = $node->findvalue('child::primary');
my $first = ( $primary =~ /^[A-Za-z]/ ) ? uc( substr( $primary, 0, 1 ) ) : ''; # first letter or marker
my $secondary = $node->findvalue('child::secondary') || '';
my $primary = $node->findvalue('child::primary');
my $first = ( $primary =~ /^[A-Za-z]/ ) ? uc( substr( $primary, 0, 1 ) ) : ''; # first letter or marker
my $secondary = $node->findvalue('child::secondary') || '';
+ my $see = $node->findvalue('child::see');
+ my $see_also = $node->findvalue('child::seealso');
+
next unless ( $primary || $secondary ); # skip blank entries for now...
next unless ( $primary || $secondary ); # skip blank entries for now...
+
+ if ( $see ) {
+ # not perfect; the whole line ends up bold
+ if ( $secondary ) {
+ $secondary .= ' see ' . $see;
+ } else {
+ $primary .= ' see ' . $see;
+ }
+ } elsif ( $see_also ) {
+ if ( $secondary ) {
+ $secondary .= ' see also ' . $see_also;
+ } else {
+ $primary .= ' see also ' . $see_also;
+ }
+ }
+
$index_hash->{$role}{$first}{$primary}{$secondary} ||= [];
$index_hash->{$role}{$first}{$primary}{$secondary} ||= [];
+ next if ( $see || $see_also );
+
+# JGH 2022/07/01
+# The $current_id being pushed here is presumably the section, given where the
+# hyperlink end up pointing to. For bug 2889 we'd like to have something more
+# precise; tha presumably requires an anchor at the indexed point?
+
push @{ $index_hash->{$role}{$first}{$primary}{$secondary} }, $current_id;
}
else {
push @{ $index_hash->{$role}{$first}{$primary}{$secondary} }, $current_id;
}
else {