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:
- This is within a span tag.
- This is within a cite tag.
This is within a del tag.
- © copyright
- AT&T should render the same as AT&T
- 4 < 5 should render the same as 4 < 5
Note that GitHub Flavored Markdown has URL autolinking, which will not
convert &
. So these two should yield different links:
- http://images.google.com/images?num=30&q=larry+bird
- http://images.google.com/images?num=30&q=larry+bird
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 the first list item.
- This is the second list item.
Here's some example code:
return shell_exec("echo $input | $markdown_script");
First:
- Red
- Green
- Blue
Second:
- Red
- Green
- Blue
Third:
- Red
- Green
- Blue
First:
- Bird
- McHale
- Parish
Second:
- Bird
- McHale
- Parish
Third:
- Bird
- McHale
- Parish
First:
- 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:
- 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.
- Bird
- Magic
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>
- What a great season. (oops, I wanted a year, not a list)
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] id reference-style link with a space separating the brackets.
These should all be equivalent:
- single asterisks
- single underscores
- double asterisks
- double underscores
- unfriggingbelievable
- *this text is surrounded by literal asterisks*
- Use the
printf()
function. There is a literal backtick (`) here.
- A single backtick in a code span:
`
- A backtick-delimited string in a code span:
`foo`
- Please don't use any
<blink>
tags. —
is the decimal-encoded equivalent of—
- *literal asterisks*
- \ backslash
- ` backtick
- * asterisk
- _ underscore
- {} curly braces
- [] square brackets
- () parentheses
- # hash mark
- + plus sign
- - minus sign (hyphen)
- . dot
- ! exclamation mark
See GitHub Flavored Markdown for details.
- wow_great_stuff
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
- @mentions, #refs, links, formatting, and
tagsare supported - list syntax is required (any unordered or ordered list supported)
- this is a complete item
- this is an incomplete item
Task lists can be nested to better structure your tasks:
- a bigger project
- first subtask #1234
- follow up subtask #4321
- final subtask cc @mention
- a separate task