1Text::MultiMarkdown(3)User Contributed Perl DocumentationText::MultiMarkdown(3)
2
3
4

NAME

6       Text::MultiMarkdown - Convert MultiMarkdown syntax to (X)HTML
7

SYNOPSIS

9           use Text::MultiMarkdown 'markdown';
10           my $html = markdown($text);
11
12           use Text::MultiMarkdown 'markdown';
13           my $html = markdown( $text, {
14               empty_element_suffix => '>',
15               tab_width => 2,
16               use_wikilinks => 1,
17           } );
18
19           use Text::MultiMarkdown;
20           my $m = Text::MultiMarkdown->new;
21           my $html = $m->markdown($text);
22
23           use Text::MultiMarkdown;
24           my $m = Text::MultiMarkdown->new(
25               empty_element_suffix => '>',
26               tab_width => 2,
27               use_wikilinks => 1,
28           );
29           my $html = $m->markdown( $text );
30

DESCRIPTION

32       Markdown is a text-to-HTML filter; it translates an easy-to-read /
33       easy-to-write structured text format into HTML. Markdown's text format
34       is most similar to that of plain text email, and supports features such
35       as headers, *emphasis*, code blocks, blockquotes, and links.
36
37       Markdown's syntax is designed not as a generic markup language, but
38       specifically to serve as a front-end to (X)HTML. You can use span-level
39       HTML tags anywhere in a Markdown document, and you can use block level
40       HTML tags ("<div>", "<table>" etc.). Note that by default Markdown
41       isn't interpreted in HTML block-level elements, unless you add a
42       "markdown=1"" attribute to the element. See Text::Markdown for details.
43
44       This module implements the MultiMarkdown markdown syntax extensions
45       from:
46
47           http://fletcherpenney.net/multimarkdown/
48

SYNTAX

50       For more information about (original) Markdown's syntax, see:
51
52           http://daringfireball.net/projects/markdown/
53
54       This module implements MultiMarkdown, which is an extension to
55       Markdown..
56
57       The extension is documented at:
58
59           http://fletcherpenney.net/multimarkdown/
60
61       and borrows from php-markdown, which lives at:
62
63           http://michelf.com/projects/php-markdown/extra/
64
65       This documentation is going to be moved/copied into this module for
66       clearer reading in a future release..
67

OPTIONS

69       MultiMarkdown supports a number of options to it's processor which
70       control the behaviour of the output document.
71
72       These options can be supplied to the constructor, on in a hash with the
73       individual calls to the markdown method.  See the synopsis for examples
74       of both of the above styles.
75
76       The options for the processor are:
77
78       use_metadata
79           Controls the metadata options below.
80
81       strip_metadata
82           If true, any metadata in the input document is removed from the
83           output document (note - does not take effect in complete document
84           format).
85
86       empty element suffix
87           This option can be used to generate normal HTML output. By default,
88           it is ' />', which is xHTML, change to '>' for normal HTML.
89
90       img_ids
91           Controls if <img> tags generated have an id attribute. Defaults to
92           true.  Turn off for compatibility with the original markdown.
93
94       heading_ids
95           Controls if <hX> tags generated have an id attribute. Defaults to
96           true.  Turn off for compatibility with the original markdown.
97
98       bibliography_title
99           The title of the generated bibliography, defaults to
100           'Bibliography'.
101
102       tab_width
103           Controls indent width in the generated markup, defaults to 4
104
105       disable_tables
106           If true, this disables the MultiMarkdown table handling.
107
108       disable_footnotes
109           If true, this disables the MultiMarkdown footnotes handling.
110
111       disable_bibliography
112           If true, this disables the MultiMarkdown bibliography/citation
113           handling.
114
115       disable_definition_lists
116           If true, this disables the MultiMarkdown definition list handling.
117
118       A number of possible items of metadata can also be supplied as options.
119       Note that if the use_metadata is true then the metadata in the document
120       will overwrite the settings on command line.
121
122       Metadata options supported are:
123
124       document_format
125       use_wikilinks
126       base_url
127

METADATA

129       MultiMarkdown supports the concept of 'metadata', which allows you to
130       specify a number of formatting options within the document itself.
131       Metadata should be placed in the top few lines of a file, on value per
132       line as colon separated key/value pairs.  The metadata should be
133       separated from the document with a blank line.
134
135       Most metadata keys are also supported as options to the constructor, or
136       options to the markdown method itself. (Note, as metadata, keys contain
137       space, whereas options the keys are underscore separated.)
138
139       You can attach arbitrary metadata to a document, which is output in
140       HTML <META> tags if unknown, see t/11document_format.t for more info.
141
142       A list of 'known' metadata keys, and their effects are listed below:
143
144       document format
145           If set to 'complete', MultiMarkdown will render an entire xHTML
146           page, otherwise it will render a document fragment
147
148           css Sets a CSS file for the file, if in 'complete' document format.
149
150           title
151               Sets the page title, if in 'complete' document format.
152
153       use wikilinks
154           If set to '1' or 'on', causes links that are WikiWords to
155           automatically be processed into links.
156
157       base url
158           This is the base URL for referencing wiki pages. In this is not
159           supplied, all wiki links are relative.
160

METHODS

162   new
163       A simple constructor, see the SYNTAX and OPTIONS sections for more
164       information.
165
166   markdown
167       The main function as far as the outside world is concerned. See the
168       SYNOPSIS for details on use.
169

BUGS

171       To file bug reports or feature requests please send email to:
172
173           bug-Text-Markdown@rt.cpan.org
174
175       Please include with your report: (1) the example input; (2) the output
176       you expected; (3) the output Markdown actually produced.
177

VERSION HISTORY

179       See the Changes file for detailed release notes for this version.
180

AUTHOR

182           John Gruber
183           http://daringfireball.net/
184
185           PHP port and other contributions by Michel Fortin
186           http://michelf.com/
187
188           MultiMarkdown changes by Fletcher Penney
189           http://fletcher.freeshell.org/
190
191           CPAN Module Text::MultiMarkdown (based on Text::Markdown by Sebastian
192           Riedel) originally by Darren Kulp (http://kulp.ch/)
193
194           This module is maintained by: Tomas Doran http://www.bobtfish.net/
195

THIS DISTRIBUTION

197       Please note that this distribution is a fork of Fletcher Penny's
198       MultiMarkdown project, and it *is not* in any way blessed by him.
199
200       Whilst this code aims to be compatible with the original MultiMarkdown
201       (and incorporates and passes the MultiMarkdown test suite) whilst
202       fixing a number of bugs in the original - there may be differences
203       between the behaviour of this module and MultiMarkdown. If you find any
204       differences where you believe Text::MultiMarkdown behaves contrary to
205       the MultiMarkdown spec, please report them as bugs.
206

SOURCE CODE

208       You can find the source code repository for Text::Markdown and
209       Text::MultiMarkdown on GitHub at
210       <http://github.com/bobtfish/text-markdown>.
211
213       Original Code Copyright (c) 2003-2004 John Gruber
214       <http://daringfireball.net/> All rights reserved.
215
216       MultiMarkdown changes Copyright (c) 2005-2006 Fletcher T. Penney
217       <http://fletcher.freeshell.org/> All rights reserved.
218
219       Text::MultiMarkdown changes Copyright (c) 2006-2009 Darren Kulp
220       <http://kulp.ch> and Tomas Doran <http://www.bobtfish.net>
221
222       Redistribution and use in source and binary forms, with or without
223       modification, are permitted provided that the following conditions are
224       met:
225
226       * Redistributions of source code must retain the above copyright
227       notice,
228         this list of conditions and the following disclaimer.
229
230       * Redistributions in binary form must reproduce the above copyright
231         notice, this list of conditions and the following disclaimer in the
232         documentation and/or other materials provided with the distribution.
233
234       * Neither the name "Markdown" nor the names of its contributors may
235         be used to endorse or promote products derived from this software
236         without specific prior written permission.
237
238       This software is provided by the copyright holders and contributors "as
239       is" and any express or implied warranties, including, but not limited
240       to, the implied warranties of merchantability and fitness for a
241       particular purpose are disclaimed. In no event shall the copyright
242       owner or contributors be liable for any direct, indirect, incidental,
243       special, exemplary, or consequential damages (including, but not
244       limited to, procurement of substitute goods or services; loss of use,
245       data, or profits; or business interruption) however caused and on any
246       theory of liability, whether in contract, strict liability, or tort
247       (including negligence or otherwise) arising in any way out of the use
248       of this software, even if advised of the possibility of such damage.
249
250
251
252perl v5.12.3                      2011-04-26            Text::MultiMarkdown(3)
Impressum