.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Text::Markdown::Discount 3pm" .TH Text::Markdown::Discount 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Text::Markdown::Discount \- fast function for converting markdown to HTML (requires C compiler) .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use Text::Markdown::Discount; \& my $html = markdown($text) .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Text::Markdown::Discount is a perl interface to the \f(CW\*(C`Discount\*(C'\fR library, a C implementation of John Gruber's \f(CW\*(C`markdown\*(C'\fR. .PP It is the fastest of the Perl modules available for converting markdown: see the list in "SEE ALSO". It passes Gruber's Markdown testsuite. .PP Given that the performance of Discount, Text::Markdown::Discount processes markdown formatted text quickly and passes the Markdown test suite at .PP The interface of the \f(CWmarkdown()\fR function in this module is not compatible with the \f(CWmarkdown()\fR function in Text::Markdown. .SS EXPORT .IX Subsection "EXPORT" \&\fImarkdown\fR is exported by default. .SS FUNCTION .IX Subsection "FUNCTION" .ie n .IP Text::Markdown::Discount::with_html5_tags() 4 .el .IP \f(CWText::Markdown::Discount::with_html5_tags()\fR 4 .IX Item "Text::Markdown::Discount::with_html5_tags()" This function enables html5 block-level elements support. \&\f(CWText::Markdown::Discount::markdown()\fR will handle these html5 tags as block elements: aside, footer, header, hgroup, nav, section, article. .Sp \&\fBNOTE\fR: There is no way to disable/re\-enable this feature in one process right now. .Sp .Vb 5 \& use Text::Markdown::Discount; \& Text::Markdown::Discount::with_html5_tags(); \& my $html = markdown(\*(Aq
content
\*(Aq); \& # \& # In $html,
tag won\*(Aqt be wrapped with

tag .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" There are other modules on CPAN for converting Markdown: .IP \(bu 4 Text::Markdown is a pure-perl markdown converter. .IP \(bu 4 Markdent is a toolkit for parsing markdown, which can also be used to convert markdown to HTML. .IP \(bu 4 Text::Markup is a converter than can handle a number of input formats, including markdown. .IP \(bu 4 Text::MultiMarkdown converts MultiMarkdown (a superset of the original markdown format) to HTML. .PP Additional markdown resources: .IP \(bu 4 Discount \- David Loren Parsons's library for converting markdown, written in C. .IP \(bu 4 Markdown definition \- John Gruber's original definition of the markdown format. .IP \(bu 4 Markdown testsuite \- John Gruber's testsuite for markdown. .IP \(bu 4 Markdown modules \- a review of all Perl modules for handling markdown, written by Neil Bowers. .SH AUTHOR .IX Header "AUTHOR" Masayoshi Sekimura, .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2013 by Masayoshi Sekimura .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available. .PP This product includes software developed by David Loren Parsons