NAME
Markdown::Parser::LinkDefinition - Markdown Link Definition Element
SYNOPSIS
my $o = Markdown::Parser::LinkDefinition->new;
# or
$doc->add_element( $o->create_link_definition( @_ ) );
VERSION
v0.3.0
DESCRIPTION
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"
METHODS
as_markdown
Returns a string representation of the link definition formatted in markdown.
It returns a plain string.
as_pod
Returns a string representation of the link definition formatted in pod.
It returns a plain string.
as_string
Returns an html representation of the link definition.
It returns a plain string.
copy_to
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.
id
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.
link_id
Sets or gets the link definition id. Stores the value as an Module::Generic::Scalar object.
Returns the current value.
title
Sets or gets the link definition title. Stores the value as an Module::Generic::Scalar object.
Returns the current value.
url
Sets or gets the link definition url. This stores the value as an URL object.
Returns the current value.
SEE ALSO
Markdown original author reference on emphasis: https://daringfireball.net/projects/markdown/syntax#link
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.