65
49
The options for the processor are:
68
Controls the metadata options below.
73
51
empty element suffix
74
52
This option can be used to generate normal HTML output. By default,
75
53
it is ' />', which is xHTML, change to '>' for normal HTML.
78
Controls if <img> tags generated have an id attribute. Defaults to
79
true. Turn off for compatibility with the original markdown.
82
Controls if <hX> tags generated have an id attribute. Defaults to
83
true. Turn off for compatibility with the original markdown.
86
The title of the generated bibliography, defaults to 'Bibliography'.
89
56
Controls indent width in the generated markup, defaults to 4
91
A number of possible items of metadata can also be supplied as options.
92
Note that if the use_metadata is true then the metadata in the document
93
will overwrite the settings on command line.
95
Metadata options supported are:
102
MultiMarkdown supports the concept of 'metadata', which allows you to
103
specify a number of formatting options within the document itself.
104
Metadata should be placed in the top few lines of a file, on value per
105
line as colon separated key/value pairs. The metadata should be
106
separated from the document with a blank line.
108
Most metadata keys are also supported as options to the constructor, or
109
options to the markdown method itself. (Note, as metadata, keys contain
110
space, whereas options the keys are underscore separated.)
112
You can attach arbitrary metadata to a document, which is output in HTML
113
<META> tags if unknown, see t/11document_format.t for more info.
115
A list of 'known' metadata keys, and their effects are listed below:
118
If set to 'complete', MultiMarkdown will render an entire xHTML
119
page, otherwise it will render a document fragment
121
css Sets a CSS file for the file, if in 'complete' document format.
124
Sets the page title, if in 'complete' document format.
127
If set to '1' or 'on', causes links that are WikiWords to
128
automatically be processed into links.
131
This is the base URL for referencing wiki pages. In this is not
132
supplied, all wiki links are relative.
135
new A very simple constructor.
138
The main function as far as the outside world is concerned. See the
139
SYNOPSIS for details on use.
142
The main function (internal use only).
154
Warning: this code is messy and does not adhere to any consistent set of
155
code guidelines; this is not because of the original quality of the
156
code, which is far above what I can pretend to be capable of creating,
157
but because of the various patching and diffing steps in between and the
158
incomplete translation of the original code into a module.
58
markdown_in_html_blocks
59
Controls if Markdown is processed when inside HTML blocks. Defaults
65
A simple constructor, see the SYNTAX and OPTIONS sections for more
69
The main function as far as the outside world is concerned. See the
70
SYNOPSIS for details on use.
73
Returns a reference to a hash with the key being the markdown reference
74
and the value being the URL.
76
Useful for building scripts which preprocess a list of links before the
77
main content. See t/05options.t for an example of this hashref being
78
passed back into the markdown method to create links.
81
Markdown has been re-implemented in a number of languages, and with a
84
Those that I have found are listed below:
86
C - <http://www.pell.portland.or.us/~orc/Code/discount>
87
Discount - Original Markdown, but in C. Fastest implementation
88
available, and passes MDTest. Adds it's own set of custom features.
90
python - <http://www.freewisdom.org/projects/python-markdown/>
91
Python Markdown which is mostly compatible with the original, with
92
an interesting extension API.
94
ruby (maruku) - <http://maruku.rubyforge.org/>
95
One of the nicest implementations out there. Builds a parse tree
96
internally so very flexible.
98
php - <http://michelf.com/projects/php-markdown/>
99
A direct port of Markdown.pl, also has a separately maintained
100
'extra' version, which adds a number of features that were borrowed
103
lua - <http://www.frykholm.se/files/markdown.lua>
104
Port to lua. Simple and lightweight (as lua is).
106
haskell - <http://johnmacfarlane.net/pandoc/>
107
Pandoc is a more general library, supporting Markdown,
108
reStructuredText, LaTeX and more.
110
javascript - <http://www.attacklab.net/showdown-gui.html>
111
Direct(ish) port of Markdown.pl to JavaScript
161
To file bug reports or feature requests (other than topics listed in the
162
Caveats section above) please send email to:
164
support@daringfireball.net (for Markdown issues)
166
fletcher@freeshell.org (for MultiMarkdown issues)
168
kulp@cpan.org, bobtfish@bobtfish.net (for Text::MultiMarkdown issues)
114
To file bug reports or feature requests please send email to:
116
bug-Text-Markdown@rt.cpan.org
170
118
Please include with your report: (1) the example input; (2) the output
171
119
you expected; (3) the output Markdown actually produced.
184
132
http://fletcher.freeshell.org/
186
134
CPAN Module Text::MultiMarkdown (based on Text::Markdown by Sebastian
187
Riedel) by Darren Kulp & Tomas Doran
188
http://kulp.ch/ & http://www.bobtfish.net/
135
Riedel) originally by Darren Kulp (http://kulp.ch/)
137
This module is maintained by: Tomas Doran http://www.bobtfish.net/
140
Please note that this distribution is a fork of John Gruber's original
141
Markdown project, and it *is not* in any way blessed by him.
143
Whilst this code aims to be compatible with the original Markdown.pl
144
(and incorporates and passes the Markdown test suite) whilst fixing a
145
number of bugs in the original - there may be differences between the
146
behavior of this module and Markdown.pl. If you find any differences
147
where you believe Text::Markdown behaves contrary to the Markdown spec,
148
please report them as bugs.
150
Text::Markdown *does not* extend the markdown dialect in any way from
151
that which is documented at daringfireball. If you want additional
152
features, you should look at Text::MultiMarkdown.
190
154
COPYRIGHT AND LICENSE
191
155
Original Code Copyright (c) 2003-2004 John Gruber