Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rename pygmentize-code-blocks -> highlight-code-blocks
We don't need to know how the code blocks are being highlighted, especially
not in the name of the sub which does the highlighting.
  • Loading branch information
Paul Cochrane committed Feb 20, 2015
1 parent 39e1c0f commit 1ebc2d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htmlify.p6
Expand Up @@ -2,7 +2,7 @@
use v6;

# This script isn't in bin/ because it's not meant to be installed.
# for syntax hilighting, needs pygmentize version 2.0 or newer installed
# For syntax highlighting, needs pygmentize version 2.0 or newer installed

BEGIN say 'Initializing ...';

Expand Down Expand Up @@ -126,7 +126,7 @@ sub MAIN(
process-pod-dir 'Language', :$sparse;
process-pod-dir 'Type', :sorted-by{ %h{.key} // -1 }, :$sparse;

pygmentize-code-blocks unless $no-highlight;
highlight-code-blocks unless $no-highlight;

say 'Composing doc registry ...';
$*DR.compose;
Expand Down Expand Up @@ -683,7 +683,7 @@ sub write-qualified-method-call(:$name!, :$pod!, :$type!) {
spurt "html/routine/{$type}.{$name}.html", p2h($p, 'routine');
}

sub pygmentize-code-blocks {
sub highlight-code-blocks {
my $pyg-version = try qx/pygmentize -V/;
if $pyg-version && $pyg-version ~~ /^'Pygments version ' (\d\S+)/ {
if Version.new(~$0) ~~ v2.0+ {
Expand Down

0 comments on commit 1ebc2d6

Please sign in to comment.