notes
- Cheat Sheet
- Regular markdown syntax
- Python markdown
- GitHub Flavored Markdown
- "Markdown Here" cheatsheet
Anchors
Use the {#id}
syntax at the end of a heading to give it an
id
attribute. e.g.
## Some Title Section {#some-title} …
generates
<h2 id="some-title">Some Title Section</h2>
Inline HTML
- Note: Some markdown official update changed things so
that all content inside html block elements are passed
through raw. To process markdown inside html block
elements, add the
markdown="1"
attribute to it.- e.g.
<div markdown="1"> **bold** </div>
- e.g.
<br>
tags
End a line with two spaces to add a <br/>
linebreak.
Links
See http://daringfireball.net/projects/markdown/syntax#link
Angle brackets create automatic links.
<http://www.google.com>
renders as http://www.google.com
Images
![Alt text](/path/to/img.jpg "Optional title")
Footnotes
eg.
This is a paragraph with a footnote. [^note-id] [^note-id]: This is the text of the note.
which looks like
This is a paragraph with a footnote. 1
Multiple paragraphs can be included in the note text by indenting them, just as
with multi-paragraph list item. However, unlike list items, even
single-paragraph footnotes will be wrapped in <p>
tags.
Abbreviations
eg.
The HTML specification is maintained by the W3C. *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium
and will be rendered as
<p>The <abbr title="Hyper Text Markup Language">HTML</abbr> specification is maintained by the <abbr title="World Wide Web Consortium">W3C</abbr>.</p>
which looks like
The HTML specification is maintained by the W3C.
Definition Lists
eg.
Apple : Pomaceous fruit of plants of the genus Malus in the family Rosaceae. Orange : The fruit of an evergreen tree of the genus Citrus.
and will be rendered as
<dl> <dt>Apple</dt> <dd>Pomaceous fruit of plants of the genus Malus in the family Rosaceae.</dd> <dt>Orange</dt> <dd>The fruit of an evergreen tree of the genus Citrus.</dd> </dl>
which looks like
- Apple
- Pomaceous fruit of plants of the genus Malus in the family Rosaceae.
- Orange
- The fruit of an evergreen tree of the genus Citrus.
Fenced Code Blocks
Fenced code blocks can have a blank line as the first and/or last line of a code block and they can also come immediately after a list item without becoming part of the list.
eg.
~~~~~~~~~~~~~~~~~~~~ a one-line code block ~~~~~~~~~~~~~~~~~~~~ which looks like
a one-line code block
They can also specify the language like this.
python | html
~~~~{.python} #!python import os, sys print dir(os), dir(sys) ~~~~ ~~~~.html <p>HTML Document</p> ~~~~
which looks like the below - but will be missing the formatting ('codehilite' appears not to work in fenced code blocks).
import os, sys print dir(os), dir(sys)
<p>HTML Document</p>
Tables
eg.
First Header | Second Header ------------- | ------------- Content Cell | Content Cell Wdier Content Cell | Content Cell
which looks like
First Header | Second Header |
---|---|
Content Cell | Content Cell |
Wider Content Cell | Content Cell |
Testing
Block quotes
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.
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.
Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.
Block quote nesting
> A standard blockquote is indented > > A nested blockquote is indented more > > > > You can nest to any depth.
This looks like:
A standard blockquote is indented
A nested blockquote is indented more
You can nest to any depth.
-
This is the text of the note. ↩