Markdown Syntax Extensions

Markdown markup Language extensions by David Parsons

Paragraph centering
To center a paragraph, frame it with -> and <-.
->this is a test<-

produces

<center>this is a test</center>
Specifying image sizes
An image size is defined by adding an additional =widthxheight field to the image tag:
 ![dust mite] (http://dust.mite =150x150)

produces

 <img src="http://dust mite" height=150 width=150 alt="dust mite">
Definition lists
To mark up a definition list, left-justify the label and frame it with = characters, then put the body of the list item on the next line, indented 4 spaces.
=hey!=
    This is a definition list

produces

<dt>hey!</dt>
<dd>This is a definition list</dd>
A definition list label is just a regular line of markdown code, so you can put links and images into it.
alpha lists

Ordered lists with alphabetic labels (enabled by --enable-alpha-list during configuration) are supported in the same way that numeric ordered lists are:

a. first item
b. second item

generates

  1. first item
  2. second item
New pseudo-protocols for [] links

I wanted to be able to apply styles inline without having to manually enter the <span class="xxx"></span> html. So I redid the [][] code to support some new “protocols” within my markdown:

=class:name= The label will be wrapped by <span class="name"></span> =id:name= The label will be wrapped by <a id="name"></a> =raw:text= Text will be written verbatim to the output. The protocol was inspired by a short thread on the markdown mailing list about someone wanting to embed LaTeX inside <!-- --> and finding, to their distress, that markdown mangled it.

Passing text through in comments seems to be a path to unreadable madness, so I didn’t want to do that. This is, to my mind, a better solution.

Style blocks
accept <style></style> blocks and set them aside for printing via mkd_style().
Class blocks
A blockquote with a first line of > %class% will become <div class="class"> instead of a <blockquote>.

Related Entries