CommonMark::Parser(3pm)

CommonMark::Parser3pm

Push parser interface

Usage

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

Overview

"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.

Releases

3 releases since Debian 11 (Bullseye); the text changed 2 times.

  1. 11
  2. 12
  3. 13

From libcommonmark-perl 0.310100-1+b1 in Debian 13 (Trixie). Parsed by carta from the page's man source.