- COPYRIGHT AND LICENSE
Markdent::Parser - A markdown parser
my $handler = Markdent::Handler::HTMLStream->new( ... ); my $parser = Markdent::Parser->new( dialect => ..., handler => $handler, ); $parser->parse( markdown => $markdown );
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.
This class provides the following methods:
This method creates a new parser. It accepts the following parameters:
dialects => $name or [ $name1, $name2 ]
You can use this to apply dialect roles to the standard parser class.
If a dialect name does not contain a namespace separator (::), the constructor looks for roles named
If a dialect name does contain a namespace separator, it is used a prefix -
If any relevant roles are found, they will be used by the parser.
It is okay if a given dialect only provides a block or span parser, but not both.
block_parser_class => $class
span_parser_class => $class
handler => $handler
This can be any object which implements the Markdent::Role::Handler role. It is required.
This method parses the given document. The parsing will cause events to be fired which will be passed to the parser's handler.
See Markdent for bug reporting details.
Bugs may be submitted at https://github.com/houseabsolute/Markdent/issues.
I am also usually active on IRC as 'autarch' on
The source code repository for Markdent can be found at https://github.com/houseabsolute/Markdent.
Dave Rolsky <firstname.lastname@example.org>
This software is copyright (c) 2019 by Dave Rolsky.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
The full text of the license can be found in the LICENSE file included with this distribution.