Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 02c7082

Browse files
committed
make_nav_sectref(): Create more minimal HTML, hanging the class attribute
off an existing anchor tag if available (I think it always is, but am not completely sure).
1 parent 752ba39 commit 02c7082

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Doc/perl/l2hinit.perl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,13 @@ sub custom_driver_hook {
9797
sub make_nav_sectref {
9898
my($label,$title) = @_;
9999
if ($title) {
100-
return ("<b class='navlabel'>$label:</b> "
101-
. "<span class='sectref'>$title</span>\n");
100+
if ($title =~ /\<[aA] /) {
101+
$title =~ s/\<[aA] /<a class="sectref" /;
102+
}
103+
else {
104+
$title = "<span class=\"sectref\">$title</span>";
105+
}
106+
return "<b class=\"navlabel\">$label:</b> $title\n";
102107
}
103108
return '';
104109
}

0 commit comments

Comments
 (0)