Rosetta Code/Run examples: Difference between revisions
m
→{{header|Raku}}: minimal changes to allow it to work with relocated site and new markup
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: minimal changes to allow it to work with relocated site and new markup) |
||
Line 1,399:
my $client = HTTP::UserAgent.new;
my $url = '
my %c = ( # text colors
Line 1,477:
uh-oh("Whoops, can't find page: $url/$title :check spelling.\n\n{fuzzy-search($title)}", 'warn')
and next if $page.elems == 0;
say "Getting code from:
$entry = $page.comb(rx:i/'=={{header|' $(%l<header>) '}}==' .+? [<?before \n'=='<-[={]>*'{{header'> || $] /).Str //
Line 1,669:
multi load-lang ('raku') { ( # Language specific variables. Adjust to suit.
language => 'Raku', # language category name
exe => 'raku', # executable name to run
ext => '.raku', # file extension for
dir => 'raku', # directory to save tasks to
header => 'Raku', # header text (=={{header|Raku}}==)
Line 1,676:
# and to avoid getting tripped up when trying to run _this_ task.
# note that this tag only selects the syntax highlighting, continue to
#
tag => rx/:i <?after '<syntaxhighlight lang="' ['perl6'|'raku'] '"' ' line'? '>' > .*? <?before '</' '
) }
Line 1,686:
dir => 'perl',
header => 'Perl',
tag => rx/:i <?after '<syntaxhighlight lang="' 'perl' '"' ' line'? '>' > .*? <?before '</' 'lang>'>/,
) }
Line 1,695:
dir => 'python',
header => 'Python',
tag => rx/:i <?after '<syntaxhighlight lang="' 'python' '"' ' line'? '>' > .*? <?before '</' 'lang>'>/,
) }
Line 1,704:
dir => 'go',
header => 'Go',
tag => rx/:i <?after '<syntaxhighlight lang="' 'go' '"' ' line'? '>' > .*? <?before '</' 'lang>'>/,
) }
Line 1,713:
dir => 'tcl',
header => 'Tcl',
tag => rx/:i <?after '<syntaxhighlight lang="' 'tcl' '"' ' line'? '>' > .*? <?before '</' 'lang>'>/,
) }
|