1CommonMark::Parser(3) User Contributed Perl DocumentationCommonMark::Parser(3)
2
3
4

NAME

6       CommonMark::Parser - Push parser interface
7

SYNOPSIS

9           my $parser = CommonMark::Parser->new;
10           $parser->feed($string);
11           $parser->feed($another_string);
12           my $doc = $parser->finish;
13

DESCRIPTION

15       "CommonMark::Parser" provides a push parser interface to parse
16       CommonMark documents.
17
18   new
19          my $parser = CommonMark::Parser->new( [$options] );
20
21       Creates a parser object. $options is a bit field containing the parser
22       options. It defaults to zero ("OPT_DEFAULT"). See "Parser options" in
23       CommonMark.
24
25   feed
26           $parser->feed($string);
27
28       Feeds a part of the input Markdown to the parser.
29
30   finish
31           my $doc = $parser->finish;
32
33       Parses a CommonMark document from the strings added with "feed"
34       returning the CommonMark::Node of the document root.
35
37       This software is copyright (C) by Nick Wellnhofer.
38
39       This is free software; you can redistribute it and/or modify it under
40       the same terms as the Perl 5 programming language system itself.
41
42
43
44perl v5.34.0                      2022-01-21             CommonMark::Parser(3)
Impressum