make_nav_sectref(): Create more minimal HTML, hanging the class attribute
authorFred Drake <fdrake@acm.org>
Tue, 19 Sep 2000 15:36:19 +0000 (15:36 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 19 Sep 2000 15:36:19 +0000 (15:36 +0000)
                     off an existing anchor tag if available (I think it
                     always is, but am not completely sure).

Doc/perl/l2hinit.perl

index b551158287d29b788c7fc71d44100c1ed260555d..4274a6ca2e463734871da4f691aa3560eb0298db 100644 (file)
@@ -97,8 +97,13 @@ $CUSTOM_BUTTONS = '';
 sub make_nav_sectref {
     my($label,$title) = @_;
     if ($title) {
-       return ("<b class='navlabel'>$label:</b> "
-               . "<span class='sectref'>$title</span>\n");
+        if ($title =~ /\<[aA] /) {
+            $title =~ s/\<[aA] /<a class="sectref" /;
+        }
+        else {
+            $title = "<span class=\"sectref\">$title</span>";
+        }
+        return "<b class=\"navlabel\">$label:</b> $title\n";
     }
     return '';
 }