1 Isn't this functionality a part of what [[plugins/toc]] needs and does? Then probably the [[plugins/toc]] plugin's code could be split into the part that implements the [[plugins/contrib/headinganchors]]'s functionality and the TOC generation itself. That will bring more order into the code and the set of available plugins. --Ivan Z.
5 A patch to make it more like MediaWiki:
7 <pre>--- headinganchors.pm
16 hook(type => "sanitize", id => "headinganchors", call => \&headinganchors);
22 - $str =~ s/[&\?"\'\.,\(\)!]//mig;
23 - $str =~ s/[^a-z]/_/mig;
26 + $str =~ s/^[^a-zA-Z]/z-/; # must start with an alphabetical character
27 + $str = uri_escape_utf8($str);
37 I think using this below would let the source html clear for the browser
38 without changing the render:
44 #$str = uri_escape_utf8($str);
45 $str = Encode::decode_utf8($str);