Markdown code to test:

Headers in Setext format:

# This is an H1 ## This is an H2 Headers in atx format: # This is an H1 ## This is an H2 ### This is an H3 #### This is an H4 ##### This is an H5 ###### This is an H6 This is a blockquote with two paragraphs: > Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. > > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. This is also blockquote with two paragraphs, but in shorthand: > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. > > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. This is a set of nested blockquotes: > This is the first level of quoting. > > This is nested blockquote. > > Back to the first level. Blockquotes can contain markdown: > ## This is a header. This is the first list item.This is the second list item. > Here's some example code: > return shell_exec("echo $input | $markdown_script"); Lists with stars**! * Red * Green * Blue Lists with pluses++ * Red * Green * Blue Lists with dashes-- * Red * Green * Blue Ordered lists with numbers 1,2,3 1. Bird 1. McHale 1. Parish Ordered lists with numbers out of order 1,1,2,3,5,8 1. Bird 1. Stuff 1. McHale 1. Parish 1. Things 1. Etc. Lists can have hanging indents: * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. Or not: * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. Paragraphs in lists: * Bird * Magic Lists with multiple paragraphs have to have fancy whitespacing (tab or 4-space indent) 1. This is a list item with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. Donec sit amet nisl. Aliquam semper ipsum sit amet velit. 1. Suspendisse id sem consectetuer libero luctus adipiscing. Or you can be somewhat lazy: * This is a list item with two paragraphs. This is the second paragraph in the list item. You're only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. * Another item in the same list. They can also be a bit more complicated: * A list item with a blockquote: > This is a blockquote inside a list item. * A list item with a code block: <code goes here> Accidental lists can be prevented: 1. What a great season. -> 1986. What a great season. Codeblocks: This is a code block. Indented codeblocks have one level removed: tell application "Foo" beep end tell Horizontal Rules: <hr/><hr/><hr/><hr/><hr/> Links: This is [an example](http://example.com/) inline link. [This link](http://example.net/) has no title attribute. Emphasis: _single asterisks_ _single underscores_ **double asterisks** **double underscores** Backticks for code: Use the `printf()` function. Images: ![Alt text](

) ![Alt text](

Advertisement

) [an example]: http://example.com/ "Title" [This link]: http://example.net/

Acutal markdown test:

Headers in Setext format:

This is an H1

This is an H2

Headers in atx format:

This is an H1

This is an H2

This is an H3

This is an H4

This is an H5

This is an H6

This is a blockquote with two paragraphs:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.

Advertisement

This is also blockquote with two paragraphs, but in shorthand:

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.

Advertisement

This is a set of nested blockquotes:

This is the first level of quoting.

This is nested blockquote.

Back to the first level.

Blockquotes can contain markdown:

This is a header. This is the first list item.This is the second list item.

Here's some example code: return shell_exec("echo $input | $markdown_script");

Lists with stars**!

  • Red
  • Green
  • Blue

Lists with pluses++

  • Red
  • Green
  • Blue

Lists with dashes—

  • Red
  • Green
  • Blue

Ordered lists with numbers 1,2,3

  1. Bird
  2. McHale
  3. Parish

Ordered lists with numbers out of order 1,1,2,3,5,8

  1. Bird
  2. Stuff
  3. McHale
  4. Parish
  5. Things
  6. Etc.

Lists can have hanging indents:

  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
  • Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.

Advertisement

Or not:

  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
  • Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.

Advertisement

Paragraphs in lists:

  • Bird
  • Magic

Lists with multiple paragraphs have to have fancy whitespacing (tab or 4-space indent)

Advertisement

  1. This is a list item with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.

Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. Donec sit amet nisl. Aliquam semper ipsum sit amet velit. 1. Suspendisse id sem consectetuer libero luctus adipiscing.

Or you can be somewhat lazy:

  • This is a list item with two paragraphs.

This is the second paragraph in the list item. You're only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. * Another item in the same list.

Advertisement

They can also be a bit more complicated:

  • A list item with a blockquote:

This is a blockquote inside a list item. * A list item with a code block:

<code goes here>

Accidental lists can be prevented:

  1. What a great season.

->

  1. What a great season.

Codeblocks:

This is a code block.

Indented codeblocks have one level removed:

tell application "Foo" beep end tell

Horizontal Rules:






Links:

This is an example inline link.

This link has no title attribute.

Emphasis:

single asterisks

single underscores

double asterisks

double underscores

Backticks for code:

Use the printf() function.

Images:

Advertisement

[an example]: http://example.com/ "Title" [This link]: http://example.net/