Skip to content

Commit

Permalink
fixed support for links within a page in Mojolicious::Plugin::PODRend…
Browse files Browse the repository at this point in the history
…erer
  • Loading branch information
kraih committed Nov 1, 2013
1 parent 701073e commit 88e782c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Changes
@@ -1,5 +1,6 @@

4.54 2013-11-01
4.54 2013-11-02
- Fixed support for links within a page in Mojolicious::Plugin::PODRenderer.

4.53 2013-10-30
- Fixed a few unsubscribe and error event bugs in Mojo::EventEmitter.
Expand Down
3 changes: 3 additions & 0 deletions lib/Mojolicious/Plugin/PODRenderer.pm
Expand Up @@ -74,6 +74,9 @@ sub _html {
$self->link_to($text => $toc, class => 'mojoscroll', id => $anchor));
}

# Rewrite anchors in documentation
$_->{class} .= ' mojoscroll' for $dom->find('a.podlinkpod[href^="#"]')->each;

# Try to find a title
my $title = 'Perldoc';
$dom->find('h1 + p')->first(sub { $title = shift->text });
Expand Down

0 comments on commit 88e782c

Please sign in to comment.