|
NAMEMarkdown::Render - Render markdown as HTML SYNOPSISuse Markdown::Render; my $md = Markdown::Render->new( infile => 'README.md'); $md->render_markdown->print_html; ...or from the command line to create HTML md-utils.pl -r README.md > README.html ...or from the command line to replace render custom tags md-utils.pl README.md.in > README.md DESCRIPTIONRenders markdown as HTML using either GitHub's API or Text::Markdown::Discount. Optionally adds additional metadata to markdown document using custom tags. See README.md <https://github.com/rlauer6/markdown-utils/blob/master/README.md> for more details. Note: This module originally used Text::Markdown as an alternative to using the GitHub API however, there are too many bugs and idiosyncracies in that module. This module will now use Text::Markdown::Discount which is not only faster, but seems to be more compliant with GFM. Note: Text::Markdown::Discount relies on the text-markdown library which did not actually support all of the markdown features (including code fencing). You can find an updated version of Text::Markdown::Discount here: <https://github.com/rlauer6/text-markdown-discount> METHODS AND SUBROUTINESnewnew( options ) Any of the options passed to the "new" method can also be set or retrieved use the "set_NAME" or "get_NAME" methods.
finalize_markdownUpdates the markdown by interpolating the custom keywords. Invoking this method will create a table of contents and replace keywords with their values. Invoke this method prior to invoking "render_markdown". Returns the Markdown::Render object. render_markdownPasses the markdown to GitHub's markdown rendering engine. After invoking this method you can retrieve the processed html by invoking "get_html" or create a fully rendered HTML page using the "print_html" method. Returns the Markdown::Render object. print_htmlprint_html(options) Outputs the fully rendered HTML page.
AUTHORRob Lauer - rlauer6@comcast.net SEE OTHERGitHub Markdown API <https://docs.github.com/en/rest/markdown> Text::Markdown::Discount
|