NAME
FunctionalPerl::Htmlgen::MarkdownPlus
SYNOPSIS
use FunctionalPerl::Htmlgen::MarkdownPlus qw(markdownplus_parse);
use PXML::XHTML qw(BODY);
my $mediawikitoken = rand;
# passed to mediawiki_prepare from FunctionalPerl::Htmlgen::Mediawiki
my ($h1,$body1) = markdownplus_parse(
"# Hi\n\nHello [World](http://world).\n", # markdownplusstr
"Hi too", # alternative_title
$mediawikitoken);
is $h1->string, '<h1>Hi</h1>';
is BODY($body1)->string,
'<body><p>Hello <a href="http://world">World</a>.</p></body>';
DESCRIPTION
markdownplus_parse
is a wrapper around Text::Markdown that parses the latter's html string to PXML::XHTML elements (PXML::_::XHTML
objects which are PXML::Element objects). It replaces mediawiki style links with tokens as a hack to make it possible to implement those links without having to modify Text::Markdown.
(It also contains a hack to make <with_toc
...</with_toc>> tags possible, but the actual implementation of the toc is independent.)
SEE ALSO
FunctionalPerl::Htmlgen::PXMLMapper -- a protocol to further process the parsed PXML.
NOTE
This is alpha software! Read the status section in the package README or on the website.