Text::HikiDoc::Plugin - Base class of plug-in module for Text::HikiDoc .
package Text::HikiDoc::Plugin::your-plugin
use base 'Text::HikiDoc::Plugin';
sub to_html {
my $self = shift;
my @args = @_;
#
# plug-in logic
#
return $string;
}
Text::HikiDoc::Plugin can add a new format to Text::HikiDoc .
When Text::HikiDoc encounters the description of
{{your-plugin}}, Text::HikiDoc::Plugin::your-
plugin::to_html() is
executed. And {{your-plugin} is replaced with the returned character string.
- ARGS
- There are some methods for you to pass the plug-in the argument. The
following result the same all.
{{br '2'}}
or
{{br(2)}}
or
{{br
'2'
}}