Markdown::Parser::LinkDefinition - Markdown Link Definition Element
my $o = Markdown::Parser::LinkDefinition->new; # or $doc->add_element( $o->create_link_definition( @_ ) );
v0.2.0
This class represents a link definition. It is used by Markdown::Parser and inherits from Markdown::Parser::Element
In markdown, a link definition would look like this:
[foo]: http://example.com/ "Optional Title Here"
Returns a string representation of the link definition formatted in markdown.
It returns a plain string.
Returns a string representation of the link definition formatted in pod.
Returns an html representation of the link definition.
Provided with a Markdown::Parser::Element, and this will copy the link definition information to the target object, such as a Markdown::Parser::Link or an Markdown::Parser::Image.
Effectively, this will copy:
the url if the target element supports this method.
the title if the target element supports this method.
the id if the target element supports this method and there is an "id" set.
the class if the target element supports this method and there is a class set.
the attributes if the target element supports this method and there are attributes set.
It returns the target object provided, for chaining purpose.
Sets or gets the array object of css id for this link. There should only be one set. Stores the value as an Module::Generic::Array object.
Sets or gets the link definition id. Stores the value as an Module::Generic::Scalar object.
Returns the current value.
Sets or gets the link definition title. Stores the value as an Module::Generic::Scalar object.
Sets or gets the link definition url. This stores the value as an URL object.
Markdown original author reference on emphasis: https://daringfireball.net/projects/markdown/syntax#link
Jacques Deguest <jack@deguest.jp>
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.
To install Markdown::Parser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Markdown::Parser
CPAN shell
perl -MCPAN -e shell install Markdown::Parser
For more information on module installation, please visit the detailed CPAN module installation guide.