#### Samples of most of the markdown and markdown extra features

[=More or less complete example of all the Markdown Extra syntax to test if proper CSS styling is applied. I am going to add a a lot of ipsumForage McSweeney’s fanny pack, gluten-free 90’s food truck lo-fi church-key craft beer pop-up vinyl scenester kitsch. Bitters whatever vinyl shabby chic, single-origin coffee McSweeney’s sustainable messenger bag trust fund hashtag letterpress viral small batch. Vice mumblecore Portland selvage irony, twee flannel VHS DIY stumptown quinoa Tumblr semiotics tofu. Schlitz whatever single-origin coffee narwhal, butcher Odd Future tofu cliche bitters Austin McSweeney’s four loko. Flexitarian Etsy hashtag art party brunch roof party. Selvage tofu pickled kale chips, ethical Portland cornhole. Wayfarers flannel seitan, scenester Portland tote bag chillwave keffiyeh mixtape cray sriracha.=]

Let’s start out with header styling. First, the string of octothorpes:

H1 Header

H2 Header

H3 Header

H4 Header

H5 header
H6 header

Now, the Sextet string of ‘equal’ or dashes for header levels one and two

H1 Header

H2 Header

Now a simple blockquote using the greater-than > symbol

This is a multi-line blockquote with each line started by the > symbol The symbol is followed by a space and then the content is added This is the third line in the block quote I am out of things to say, so Thundercats

Now a simple lazy method where only the first line has the > symbol:

This is the first line of the lazy method with hard returns between the lines and it should, in theory, display properly. If not, then Wolf lomo quinoa direct trade American Apparel, wayfarers Echo Park typewriter forage blog Thundercats cornhole +1. Squid typewriter Bushwick locavore narwhal.

Now for a tricky bit of block-quotery - nested blockquotes

This is the first level of blockquotery - same as before (blank line)

This is a second level of blockquote inside the first Another line of the second level

A third level - notice the spaces between the symbols! Back to the second level And finally back to the first level

Now some embedded markdown in a blockquote

This is a header.

  1. This is the first list item.
  2. This is the second list item.

Here’s some example code:

return shell_exec("echo $input | $markdown_script");

Basic unordered lists with asterisks:

Now with pluses

And with dashes

And ordered lists with ordinal numbers

  1. A first item
  2. A second item
  3. A third item

And with letters:

a. A first item b. A second item c. A third item

Here is a list acid test - multiple paragraph list items:

  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.

  2. Suspendisse id sem consectetuer libero luctus adipiscing.

A code block inside a list:

Speaking of code blocks here is one using the 5 space rule:

 #include<stdio.h>
  int main(){
 prints("Hello, world\n");
 return 1;
 }

Some horizontal rules

Four asterisks:


four dashes:


four underscores:


This is a paragraph with a link Austin Pinterest Pitchfork XOXO tote bag yr, wolf flexitarian keffiyeh craft beer.

This is the regular garbage with a link. And this is an example of a link defined elsewhere in the document, in this instance to the daring fireball website.

I get 10 times more traffic from Google than from Yahoo or MSN.

Punctuation

A paragraph using single asterisks, single underscores, double asterisks, and double underscores

Code spans

This is a sentence in which I am going to embed some html <a href="#">blah</a> code using 3 backticks

Lazy linking

This is a sentence in which I surround a link with the < and > tags and it automagically makes a link, for example: http://google.com

Backslash escapes

Markdown should escape the following characters if preceded by a backslash:

These would normally be used if the characters are needed in the middle of some other Markdown formatted entity

Markdown Extra, well, extras:

Inline HTML

This:

<blockquote markdown="1">
This is *true* markdown text.

</blockquote>

Produces this:

This is *true markdown text.

Special attributes for headers

Use fenced style ## Header 2 ## {#header2} to make this work

Header 2

And now a link back to header2

Fenced code blocks with tildes and backticks

Note that the same number of characters should fence the block

three tildes:

#include<stdio.h>
int main(){
       prints("Hello, world\n");
       return 1;
}

three backticks:

#include<stdio.h>
int main(){
       prints("Hello, world\n");
       return 1;
}

Tables

First Header | Second Header
---------------------|------------------------
Content A       |  Content B
Content C       |  Content D

Produces this:

First Header Second Header
Content A Content B
Content C Content D

Using starting and ending ‘pipes’ in conjunction with a colon to align one column:

| First Header | Second Header |
| ---------------------|------------------------:|
| Item  1              |  $1600                |
| Item     C       |  $12                     |
| Item   J              | $3 |

Produces this:

First Header Second Header
Item 1 $1600
Content C $12
Item J $3

Definition Lists

Apple
:    Pomaceous fruit of plants of the genus Malus in 
the family Rosaceae.

Orange
:   The fruit of an evergreen tree of the genus Citrus.

produces this:

Apple
Pomaceous fruit of plants of the genus Malus in the family Rosaceae.
Orange
The fruit of an evergreen tree of the genus Citrus.

Footnotes

Probably the most useful Markdown Extra feature, the footnote1 allows you to easily make footnotes in the document.


  1. And define them elsewhere