NAME

MojoMojo::Formatter::SyntaxHighlight - syntax highlighting for code blocks

DESCRIPTION

This formatter performs syntax highlighting on code blocks. Unfortunately this currently works only if you're using MojoMojo::Formatter::Textile as main formatter.

METHODS

format_content_order

The syntax highlight formatter is based on <lt>pre<gt> tags and therefore it's elementary to get those unchanged. So we need to run this plugin before MojoMojo::Formatter::Wiki which actually changes those tags.

format_content

This formatter uses Syntax::Highlight::Engine::Kate to highlight code syntax inside of <lt>pre<gt> tags. To let the formatter know which language has to be highlighted, do:

<pre lang="Perl">
  print "Hello World\n";
</pre>

See "PLUGINS" in Syntax::Highlight::Engine::Kate for a list of supported languages.

SEE ALSO

MojoMojo, Module::Pluggable::Ordered and Syntax::Highlight::Engine::Kate.

AUTHORS

Johannes Plunien <plu@cpan.org>

LICENSE

This module is licensed under the same terms as Perl itself.