]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/bugs/Problem_with_toc.pm_plug-in.mdwn
rename: Show full names of affected pages.
[ikiwiki.git] / doc / bugs / Problem_with_toc.pm_plug-in.mdwn
index 88516780ed483c1cd335537993cc0ad8a105ffbd..6be5f89b5b9ce62b55d0b922924d5646b435eda9 100644 (file)
@@ -2,9 +2,14 @@ The toc.pm plug-in currently renders empty 'a' tag elements. This seems to confu
 
 Here is a patch for toc.pm for producing non-empty 'a' elements.
 
+> Thanks for the patch, but I already fixed this in 2.4 using a different
+> approach. I think your patch is slightly broken, an anchor tag isn't
+> really meant to enclose all the html it anchors to, but just be stuck in
+> front of it. --[[Joey]] [[!tag done]]
+
     --- IkiWiki/Plugin/toc.pm.orig     Thu Jun  7 11:53:53 2007
     +++ IkiWiki/Plugin/toc.pm  Thu Jun  7 13:00:00 2007
-    @@ -47,7 +47,7 @@ sub format (@) { #{{{
+    @@ -47,7 +47,7 @@ sub format (@) {
                if ($tagname =~ /^h(\d+)$/i) {
                        my $level=$1;
                        my $anchor="index".++$anchors{$level}."h$level";
@@ -13,7 +18,7 @@ Here is a patch for toc.pm for producing non-empty 'a' elements.
        
                        # Take the first header level seen as the topmost level,
                        # even if there are higher levels seen later on.
-    @@ -90,6 +90,16 @@ sub format (@) { #{{{
+    @@ -90,6 +90,16 @@ sub format (@) {
                                        "</a>\n";
                                $p->handler(text => undef);
                        }, "dtext");
@@ -29,4 +34,4 @@ Here is a patch for toc.pm for producing non-empty 'a' elements.
     +                  $page.="</a>$text";
                }
                else {
-                       $page.=$text;
\ No newline at end of file
+                       $page.=$text;