Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Syntax highlighting. Code in htmlify.pl segfaults with 2015.05
  • Loading branch information
andreoss committed May 24, 2015
1 parent e15c82b commit b7c6eff
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/Pod/Htmlify.pm6
Expand Up @@ -4,6 +4,7 @@ use URI::Escape;
use Pod::To::HTML;
use Pod::Convenience;
use Perl6::Examples;
use Text::VimColour;

class Website is export {
has $.categories is rw;
Expand Down Expand Up @@ -188,6 +189,21 @@ 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}");
warn $v.perl;
shell 'vim';

die;
}
CATCH {
default {
return "<pre>" ~ $node.contents.join ~ "</pre>";
}
}

};
pod2html $pod,
:url(&url),
:$head,
Expand Down

0 comments on commit b7c6eff

Please sign in to comment.