Markdown::phpBB::Handler - Turn Markdown into phpBB code
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.
Plenty. In particular, calling
result a second time will return an empty string.
Report them or fix them at http://github.com/pjf/Markdown-phpBB/issues.
Paul Fenwick <email@example.com>
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.