
Text::Multi::Block::Code - Text::Multi processor for code blocks

{{{ Code lang=C<< <language> >> }}}

This subclass of Text::Multi::Block implements a formatter for various types of source code using the Syntax::Highlight::Engine::Kate code coloring library.

These are parameters that can be set in the Text::Multi tag in your text document, to provide additional information to formatter modules, and potentially to influence how the content is rendered. Also see "PARAMETERS" in Text::Multi::Block for inherited parameters that can be used by this formatter.
Sets the language that the code should be rendered as. The language setting affects things like what words are considered to be keywords. See "PLUGINS" in Syntax::Highlight::Engine::Kate for a list of supported languages.
Use as a class method to set the default for all Text::Multi::Block::Code blocks.
Text::Multi::Block::Code->language( 'Bash' );
The default value is 'Perl'.
The 'language' parameter can also be abbreviated 'lang'.
Set to a numeric value greater than 0 in order to include line numbers for the code listing. The value you set it to will be the number of the first line. When set to 0, line numbering will not be included. The default value 0.
Use as a class method to set the default for all Text::Multi::Block::Code blocks.
Text::Multi::Block::Code->starting_line_number( 1 );
The 'starting_line_number' parameter can also be abbreviated 'line'.
Set to an integer value to indicate how many spaces a tab should be replaced with (tabs are actually replaced with a series of ' ' entities, rather than actual spaces.)
The default value is 4. Use as a class method to set the default for all Text::Multi::Block::Code blocks.
Text::Multi::Block::Code->tab_width( 8 );
The 'tab_width' parameter can also be abbreviated 'tabwidth'.

See "as_html" in Text::Multi::Block.
This method is overloaded to return a class including the language being rendered in addition to the values documented in "wrap_classes" in Text::Multi::Block. For example, when language=perl, the overloaded method adds 'text-multi-code-perl' to the list of classes returned.

Syntax::Highlight::Engine::Kate
http://www.jasonkohles.com/software/Text-Multi/

Jason Kohles <email@jasonkohles.com>.

Copyright (C) 2007 by Jason Kohles
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.