NAME

Markdown::phpBB::Handler - Turn Markdown into phpBB code

VERSION

version 0.02

SYNOPSIS

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;

METHODS

handle_event

Called by Markdent::Parser. Takes an event and processes it.

result

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.

DESSCRIPTION

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.

SEE ALSO

Markdown::phpBB, md2phpbb, phpbb2md, Markdent

BUGS

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.

AUTHOR

Paul Fenwick <pjf@cpan.org>

COPYRIGHT AND LICENSE

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.