Source

xemacsweb / toc.gp

Diff from to
   }
   my $anchornum = 0;
   my $tempbit = $left . "###TOC-SPLIT-HERE###" .$right;
-  my $pattern = qr{^(.*?)<h([0-9])>(?!<A NAME)\s*(.*?)</h.>(.*)\$};
+  my $pattern = qr{^(.*?)<h([0-9])>(?!<a name)\s*(.*?)</h.>(.*)\$};
   my $toc = "<ul>\n";
   my $tablevel = $startlevel;
   my ($leftbit, $level,$middlebit, $rightbit );
       }
 
       $tablevel = $level;
-      $toc= $toc . "<li><A HREF=\"#$anchornum\">$middlebit</A></li>\n";
-      $middlebit = "<H$level><A NAME= \"$anchornum\">" . $middlebit . "</A></H$level>";
+      $toc= $toc . "<li><a href=\"#$anchornum\">$middlebit</a></li>\n";
+      $middlebit = "<h$level><a name=\"$anchornum\">" . $middlebit . "</a></h$level>";
       $anchornum++;
     }
     else {
-      $middlebit = "<H$level><A NAME=\"\">" . $middlebit . "</A></H$level>";
+      $middlebit = "<h$level><a name=\"\">" . $middlebit . "</a></h$level>";
     }
     $tempbit = $leftbit . $middlebit . $rightbit; 
   }