logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

CommonMark::Parser - Push parser interface

Description

       "CommonMark::Parser" provides a push parser interface to parse CommonMark documents.

   new
          my $parser = CommonMark::Parser->new( [$options] );

       Creates a parser object. $options is a bit field containing the parser options. It defaults to zero
       ("OPT_DEFAULT"). See "Parser options" in CommonMark.

   feed
           $parser->feed($string);

       Feeds a part of the input Markdown to the parser.

   finish
           my $doc = $parser->finish;

       Parses a CommonMark document from the strings added with "feed" returning the CommonMark::Node of the
       document root.

Name

       CommonMark::Parser - Push parser interface

Synopsis

           my $parser = CommonMark::Parser->new;
           $parser->feed($string);
           $parser->feed($another_string);
           my $doc = $parser->finish;

See Also