Markdown::phpBB::Handler - Turn Markdown into phpBB code
version 0.02
use Markdent::Parser; use Markdown::phpBB::Handler; my $handler = Markdown::phpBB::Handler->new; my $parser = Markdent::Parser->new( handler => $handler, dialect => 'GitHub', # optional ); $parser->parse(markdown => $md); my $phpBB = $handler->reseult;
Called by Markdent::Parser. Takes an event and processes it.
my $phpbb = $handler->result;
Returns the final string in phpBB after conversion.
Note that in the current version, calling this also resets the handler state, so subsequent calls with return an empty string. Patches welcome to fix this.
This is a Markdent::Role::Handler which produces phpBB / BBcode from Markdown.
It will emit a warning (but will continue) if it encounters events it does not understand. Patches are very welcome.
Markdown::phpBB, md2phpbb, phpbb2md, Markdent
Plenty. In particular, calling result a second time will return an empty string.
result
Report them or fix them at http://github.com/pjf/Markdown-phpBB/issues.
Paul Fenwick <pjf@cpan.org>
This software is copyright (c) 2014 by Paul Fenwick.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Markdown::phpBB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Markdown::phpBB
CPAN shell
perl -MCPAN -e shell install Markdown::phpBB
For more information on module installation, please visit the detailed CPAN module installation guide.