NAME
Text::Markdown - Convert MultiMarkdown syntax to (X)HTML
SYNOPSIS
use Text::Markdown 'markdown';
my $html = markdown($text);
use Text::Markdown 'markdown';
my $html = markdown( $text, {
empty_element_suffix => '>',
tab_width => 2,
} );
use Text::Markdown;
my $m = Text::Markdown->new;
my $html = $m->markdown($text);
use Text::Markdown;
my $m = Text::MultiMarkdown->new(
empty_element_suffix => '>',
tab_width => 2,
);
my $html = $m->markdown( $text );
DESCRIPTION
Markdown is a text-to-HTML filter; it translates an easy-to-read / easy-to-write structured text format into HTML. Markdown's text format is most similar to that of plain text email, and supports features such as headers, *emphasis*, code blocks, blockquotes, and links.
Markdown's syntax is designed not as a generic markup language, but specifically to serve as a front-end to (X)HTML. You can use span-level HTML tags anywhere in a Markdown document, and you can use block level HTML tags (like <div> and <table> as well).
This module implements the 'original' Markdown markdown syntax from:
http://daringfireball.net/projects/markdown/
If you would like different options available / to control the parser behavior more then you're recommended to look at the OPTIONS section in the pod for Text::MultiMarkdown
SYNTAX
For more information about Markdown's syntax, see:
http://daringfireball.net/projects/markdown/
This documentation is going to be moved/copied into this module for clearer reading in a future release..
METHODS
new
Simple constructor. Takes the same arguments as the constructor of Text::MultiMarkdown, however this module overrides the following settings:
- use_metadata => 0
- heading_ids => 0
- img_ids => 0
- disable_tables => 1
- disable_footnotes => 1
- disable_bibliography => 1
markdown($text, $options)
Processes $text as markdown text and returns HTML. Takes an optional hashref of arguments, as per the new method.