Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 20, 2010
1 parent 8237f6e commit 5a2e5fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Mojolicious/Plugin/PodRenderer.pm
Expand Up @@ -98,7 +98,9 @@ sub register {
my $tag = shift;
my $text = $tag->all_text;
my $anchor = $text;
$anchor =~ s/\W/_/g;
$anchor =~ s/[^\w\-]/_/g;
$anchor =~ s/^_+//;
$anchor =~ s/_+$//;
$tag->replace_inner(
qq/<a href="$abs#$anchor" name="$anchor">$text<\/a>/);
}
Expand Down

0 comments on commit 5a2e5fe

Please sign in to comment.