Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
enable Text::VimColour
  • Loading branch information
stmuk committed Jul 9, 2015
1 parent a018c56 commit 8432216
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -15,7 +15,7 @@ install:
- panda install LWP::Simple
- panda install Algorithm::Soundex
- panda install DBIish
# - panda install Text::VimColour
- panda install Text::VimColour

script:
- make test
24 changes: 12 additions & 12 deletions lib/Pod/Htmlify.pm6
Expand Up @@ -4,7 +4,7 @@ use URI::Escape;
use Pod::To::HTML;
use Pod::Convenience;
use Perl6::Examples;
#use Text::VimColour;
use Text::VimColour;

class Website is export {
has $.categories is rw;
Expand Down Expand Up @@ -189,17 +189,17 @@ class Website is export {
method p2h($pod) {
my $head = slurp 'template/head.html';
my $footer = footer-html;
#my %*POD2HTML-CALLBACKS = code => sub (:$node, :&default) {
# try {
# my $v = Text::VimColour.new(lang => 'perl6', code => "{$node.contents.join}");
# return $v.html;
# }
# CATCH {
# default {
# return "<pre>" ~ $node.contents.join ~ "</pre>";
# }
# }
#};
my %*POD2HTML-CALLBACKS = code => sub (:$node, :&default) {
try {
my $v = Text::VimColour.new(lang => 'perl6', code => "{$node.contents.join}");
return $v.html;
}
CATCH {
default {
return "<pre>" ~ $node.contents.join ~ "</pre>";
}
}
};
pod2html $pod,
:url(&url),
:$head,
Expand Down

0 comments on commit 8432216

Please sign in to comment.