NAME
Markdent::Parser - A markdown parser
SYNOPSIS
my $handler = Markdent::Handler::HTMLStream->new( ... );
my $parser = Markdent::Parser->new(
block_parser_class => '...',
span_parser_class => '...',
handler => $handler,
);
$parse->parse( markdown => $markdown );
DESCRIPTION
This class provides the primary interface for creating a parser. It ties a block and span parser together with a handler.
By default, it will parse the standard Markdown dialect, but you can provide alternate block or span parser classes.
METHODS
This class provides the following methods:
Markdent::Parser->new(...)
This method creates a new parser. It accepts the following parameters:
block_parser_class => $class
This default to Markdent::Dialect::Standard::BlockParser, but can be any class which implements the Markdent::Role::BlockParser role.
span_parser_class => $class
This default to Markdent::Dialect::Standard::SpanParser, but can be any class which implements the Markdent::Role::SpanParser role.
handler => $handler
This can be any object which implements the Markdent::Role::Handler role. It is required.
$parser->parse( markdown => $markdown )
This method parses the given document. The parsing will cause events to be fired which will be passed to the parser's handler.
ROLES
This class does the Markdent::Role::EventsAsMethods and Markdent::Role::Handler roles.
AUTHOR
Dave Rolsky, >autarch@urth.org<
BUGS
See Markdent for bug reporting details.
AUTHOR
Dave Rolsky, <autarch@urth.org>
COPYRIGHT & LICENSE
Copyright 2009 Dave Rolsky, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.