Skip to content

Commit

Permalink
reenable Text::VimColour
Browse files Browse the repository at this point in the history
  • Loading branch information
stmuk committed Jun 11, 2015
1 parent 49eeb3a commit 69413b3
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lib/Pod/Htmlify.pm6
Original file line number Diff line number Diff line change
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 69413b3

Please sign in to comment.