.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 3pm" .TH Text::Markdown 3pm "2019-12-29" "perl v5.30.0" "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 \- Convert Markdown syntax to (X)HTML .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Text::Markdown \*(Aqmarkdown\*(Aq; \& my $html = markdown($text); \& \& use Text::Markdown \*(Aqmarkdown\*(Aq; \& my $html = markdown( $text, { \& empty_element_suffix => \*(Aq>\*(Aq, \& 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 => \*(Aq>\*(Aq, \& tab_width => 2, \& ); \& my $html = $m\->markdown( $text ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Markdown is a text-to-HTML filter; it translates an easy-to-read / easy-to-write structured text format into \s-1HTML.\s0 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. .PP 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 \&\s-1HTML\s0 tags anywhere in a Markdown document, and you can use block level \&\s-1HTML\s0 tags (like
and as well). .SH "SYNTAX" .IX Header "SYNTAX" This module implements the 'original' Markdown markdown syntax from: .PP .Vb 1 \& http://daringfireball.net/projects/markdown/ .Ve .PP Note that Text::Markdown ensures that the output always ends with \&\fBone\fR newline. The fact that multiple newlines are collapsed into one makes sense, because this is the behavior of \s-1HTML\s0 towards whispace. The fact that there's always a newline at the end makes sense again, given that the output will always be nested in a \fBblock\fR\-level element (as opposed to an inline element). That block element can be a \f(CW\*(C`

\*(C'\fR (most often), or a \f(CW\*(C`

\*(C'\fR. .PP Markdown is \fBnot\fR interpreted in \s-1HTML\s0 block-level elements, in order for chunks of pasted \s-1HTML\s0 (e.g. JavaScript widgets, web counters) to not be magically (mis)interpreted. For selective processing of Markdown in some, but not other, \s-1HTML\s0 block elements, add a \f(CW\*(C`markdown\*(C'\fR attribute to the block element and set its value to \f(CW1\fR, \f(CW\*(C`on\*(C'\fR or \f(CW\*(C`yes\*(C'\fR: .PP .Vb 5 \&