Skip to content

Add support for slides in Perl 6 syntax #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ReadMe.pod
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ characters from the contents of the slide. This can be useful if you need to
have characters special to Vroom at the beginning of your lines, for example
if the contents of your slide is unified diff output.

=item C<perl,ruby,python,php,javascript,haskell,actionscript,html,yaml,xml,json,make,shell,diff>
=item C<perl,perl6,ruby,python,php,javascript,haskell,actionscript,html,yaml,xml,json,make,shell,diff>

Specifies that the slide is one of those syntaxen, and that the appropriate
file extension will be used, thus causing vim to syntax highlight the slide.
Expand Down
7 changes: 6 additions & 1 deletion lib/Vroom.pm
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ sub runSlide {
if ($slide =~ /\.pl$/) {
exec "clear; $^X $slide";
}
elsif ($slide =~ /\.p6$/) {
my $perl6_binary = $ENV{VROOM_PERL6_PATH} || 'perl6';
exec "clear; $perl6_binary $slide";
}

$self->trim_slide;

Expand Down Expand Up @@ -607,8 +611,9 @@ sub formatNumber {
}

my $types = {
# add pl6 and py3
# add py3
perl => 'pl', pl => 'pl', pm => 'pm',
perl6 => 'p6', p6 => 'p6', pm6 => 'pm6',
ruby => 'rb', rb => 'rb',
python => 'py', py => 'py',
haskell => 'hs', hs => 'hs',
Expand Down