Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use url-munge from Pod::Htmlify in htmlify.p6
  • Loading branch information
Paul Cochrane committed Feb 20, 2015
1 parent 71799fb commit 3f26e7b
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions htmlify.p6
Expand Up @@ -13,24 +13,14 @@ use Perl6::TypeGraph;
use Perl6::TypeGraph::Viz;
use Perl6::Documentable::Registry;
use Pod::Convenience;
use Pod::Htmlify;

my $*DEBUG = False;

my $type-graph;
my %methods-by-type;
my %*POD2HTML-CALLBACKS;

sub url-munge($_) {
return $_ if m{^ <[a..z]>+ '://'};
return "/type/{uri_escape $_}" if m/^<[A..Z]>/;
return "/routine/{uri_escape $_}" if m/^<[a..z]>|^<-alpha>*$/;
# poor man's <identifier>
if m/ ^ '&'( \w <[[\w'-]>* ) $/ {
return "/routine/{uri_escape $0}";
}
return $_;
}

# TODO: Generate menulist automatically
my @menu =
('language','' ) => (),
Expand Down

0 comments on commit 3f26e7b

Please sign in to comment.