Skip to content

Commit

Permalink
Work around rakudobug RT #125921
Browse files Browse the repository at this point in the history
FROGGS++ for adding this to rakudobug.  This is also now fixed in
rakudo/glr, so we can change the code back if desired after the glr merge.
  • Loading branch information
paultcochrane committed Aug 27, 2015
1 parent f8fa62a commit ba14f7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htmlify.p6
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,8 @@ sub highlight-code-blocks(:$use-inline-python = True) {

my $py = $use-inline-python && try {
require Inline::Python;
my $py = ::('Inline::Python').new();
$py.run(q{
my $inline-py = ::('Inline::Python').new();
$inline-py.run(q{
import pygments.lexers
import pygments.formatters
p6lexer = pygments.lexers.get_lexer_by_name("perl6")
Expand All @@ -725,7 +725,7 @@ htmlformatter = pygments.formatters.get_formatter_by_name("html")
def p6format(code):
return pygments.highlight(code, p6lexer, htmlformatter)
});
$py;
$inline-py;
}
if $py {
say "Using syntax highlighting via Inline::Python";
Expand Down

0 comments on commit ba14f7b

Please sign in to comment.