diotalevi has asked for the wisdom of the Perl Monks concerning the following question:

I've tried all the documented ways of getting highlighting in my Spork presentations and nothing works. Help?

This is an example from the Spork pod. It fails to get recognized as markup.

.pretty. sub greet { # GGGGG print "Hello there\n"; # _______________ # RRRRR } .pretty.

.pretty.

sub greet {

print "Hello there\n";

}

.pretty.


I tried using Spork::Hilite as a plugin. This goes into config.yaml. If I insert this snippet of YAML into the Spork.slides file, it fails to recognize the section as YAML. I've quoted "Spork::Hilite" and 'Spork::Hilite'. I've tried an alternate representation plugin_classes: [ Spork::Hilite ]

plugin_classes: - Spork::Hilite

Can't use string ("") as an ARRAY ref while "strict refs" in use at .../lib/site_perl/5.8.7/Spoon/Registry.pm line 36.


Replies are listed 'Best First'.
Solved: Re: Can't pretty print or use plugins in Spork
by diotalevi (Canon) on Dec 13, 2005 at 11:46 UTC

    Spork says it accepts YAML on slides. It isn't really YAML - it's an undocumented format that looks really similar to YAML.

    The files ~/.sporkrc/config.yaml, your-presentation/config.yaml, and your-presentation/config/config.yaml are all parsed differently. You can specify plugin_classes in your ~/.sporkrc/config.yaml. It will throw errors if you try to do the same thing from your-presentation/config.yaml. I didn't try setting it in your-presentation/config/config.yaml

    Here's a short explanation of the Spork::Hilite format. The line # to affect follows every hilite expression. The hiliting matches characters by spacing out horizontally. Use the + suffix on a color to indicate that the hilite should apply to the entire line.

    .hilite This entire line Just the word the + g+ 1 rrr rrr 2 .hilite

    This entire line
    Just the word the