This Markdown file contains all the features of GitHub Flavored Markdown for
testing a renderer with.
The features are taken directly from Daring Fireball
and GitHub Flavored Markdown,
followed by a list of one-offs.
Foo |
Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can’t use Markdown-style *emphasis* inside an HTML block. |
Span-level HTML tags — e.g. <span>, <cite>, or <del> — can be used anywhere
in a Markdown paragraph, list item, or header. If you want, you can even use HTML tags instead
of Markdown formatting; e.g. if you’d prefer to use HTML <a> or <img> tags instead
of Markdown’s link or image syntax, go right ahead.
Testing span, cite, and del tags in a paragraph.
And each element in its own list item:
Note that GitHub Flavored Markdown has URL autolinking, which will not
convert &
. So these two should yield different links:
This is a normal paragraph.
This and the next sentence is separated by a single newline.
This should be on the same line.
This and the next sentence is joined by a single <br />
.
This should be on a new line, directly below.
These two sentences are separated by two <br />
tags.
This should be two lines below.
These two paragraphs are separated by two <br />
tags.
This should be three lines below.
Here are some headers followed by Lorem Ipsum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
The following are atx-style.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Mauris feugiat, augue vitae sollicitudin vulputate, neque arcu dapibus eros, eget semper lorem ex rhoncus nulla.
Etiam sit amet orci sit amet dui mollis molestie.
Cras et elit egestas, lacinia est eu, vestibulum enim.
Phasellus sed suscipit quam.
Nam rutrum imperdiet purus, sit amet porttitor augue tempor quis.
Email-style blockquotes:
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.
Putting the > before the first line of a hard-wrapped paragraph:
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.
Nested blockquotes (i.e. a blockquote-in-a-blockquote):
This is the first level of quoting.
This is nested blockquote.
Back to the first level.
Blockquotes containing other Markdown elements:
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");
First:
Second:
Third:
First:
Second:
Third:
First:
Second:
Blank line separated:
Bird
Magic
First:
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.
Suspendisse id sem consectetuer libero luctus adipiscing.
Second:
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.
A list item with a blockquote:
This is a blockquote
inside a list item.
A list item with a code block:
<code goes here>
1986. What a great season. (whew! there we go)
This is a normal paragraph:
This is a code block.
Here is an example of AppleScript:
tell application "Foo"
beep
end tell
Markdown will handle the hassle of encoding the ampersands and angle brackets:
<div class="footer">
© 2004 Foo Corporation
</div>
def this_is
puts "some #{4-space-indent} code"
end
print('Code block')
print('Pre block')
Markdown supports two style of links: inline and reference.
This is an example inline link.
This link has no title attribute.
See my About page for some awesome people (note: broken link).
This is an example reference-style link.
This is an example reference-style link with a space separating the brackets.
These should all be equivalent:
printf()
function.There is a literal backtick (`) here.
`
`foo`
<blink>
tags.—
is the decimal-encoded equivalent of —
See GitHub Flavored Markdown for details.
Mistaken text.
function test() {
console.log("notice the blank line before this function?");
}
print('Hello!')
console.log('JavaScript!');
console.log('JavaScript (with js)!');
console.log('No matching language, but looks like JavaScript.');
Simple:
First Header | Second Header |
---|---|
Content Cell | Content Cell |
Content Cell | Content Cell |
Pipes:
First Header | Second Header |
---|---|
Content Cell | Content Cell |
Content Cell | Content Cell |
Unmatched:
Name | Description |
---|---|
Help | Display the help window. |
Close | Closes a window |
Inner Markdown:
Name | Description |
---|---|
Help |
|
Close | Closes a window |
Alignment:
Left-Aligned | Center Aligned | Right Aligned |
---|---|---|
col 3 is | some wordy text | $1600 |
col 2 is | centered | $12 |
zebra stripes | are neat | $1 |
Text right below a table.
TODO: Test all allowed HTML tags.
See this article for details.
Roses are red
Violets are Blue
Task lists can be nested to better structure your tasks: