Text::Markdown::Discount(3pm)

Text::Markdown::Discount3pm

Fast function for converting markdown to html (requires c compiler)

Usage

  use Text::Markdown::Discount;
  my $html = markdown($text)

Overview

Text::Markdown::Discount is a perl interface to the "Discount" library, a C implementation of John Gruber's "markdown".

It is the fastest of the Perl modules available for converting markdown: see the list in "SEE ALSO". It passes Gruber's Markdown testsuite.

Given that the performance of Discount, Text::Markdown::Discount processes markdown formatted text quickly and passes the Markdown test suite at <http://daringfireball.net/projects/downloads/MarkdownTest_1.0.zip>

The interface of the markdown() function in this module is not compatible with the markdown() function in Text::Markdown.

Export

markdown is exported by default.

Function

Text::Markdown::Discount::with_html5_tags()

This function enables html5 block-level elements support. Text::Markdown::Discount::markdown() will handle these html5 tags as block elements: aside, footer, header, hgroup, nav, section, article.

NOTE: There is no way to disable/re-enable this feature in one process right now.

  use Text::Markdown::Discount;
  Text::Markdown::Discount::with_html5_tags();
  my $html = markdown('<article>content</article>');
  #
  # In $html, <article> tag won't be wrapped with <p> tag

Releases

7 releases since Debian 7 (Wheezy); the text changed 6 times.

  1. 7
  2. 8
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13

Author

Masayoshi Sekimura, <[email protected]>

From libtext-markdown-discount-perl 0.18-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.