NAME

Markdown::Parser::Header - Markdown Header Element

SYNOPSIS

my $o = Markdown::Parser::Header->new;
# or
$doc->add_element( $o->create_header( @_ ) );

VERSION

v0.2.1

DESCRIPTION

This class represents a header formatting. It is used by Markdown::Parser and inherits from Markdown::Parser::Element

METHODS

append

Provided with a Markdown::Element::Text object, or a text string, and this will add it to stack of elements or append it to the last text element if any.

as_markdown

Returns a string representation of the header formatted in markdown.

It returns a plain string.

as_pod

Returns a string representation of the header formatted in pod.

It returns a plain string.

as_string

Returns an html representation of the header.

It returns a plain string.

class

Sets or gets the array object of css class for this header.

Returns a Module::Generic::Array object.

id

Sets or gets the array object of css id for this header. There should only be one set.

Returns a Module::Generic::Array object.

level

Sets or gets the level for this header. It takes an integer which is stored as a Module::Generic::Number object.

Valid values are from 1 to 6.

Returns the current value set.

SEE ALSO

Markdown original author reference on emphasis: https://daringfireball.net/projects/markdown/syntax#header

AUTHOR

Jacques Deguest <jack@deguest.jp>

COPYRIGHT & LICENSE

Copyright (c) 2020 DEGUEST Pte. Ltd.

You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.