index.html 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
  6. <title>GitHub Markdown CSS demo</title>
  7. <link rel="stylesheet" href="github-markdown.css">
  8. <style>
  9. body {
  10. box-sizing: border-box;
  11. min-width: 200px;
  12. max-width: 980px;
  13. margin: 0 auto;
  14. padding: 45px;
  15. }
  16. </style>
  17. </head>
  18. <body>
  19. <article class="markdown-body">
  20. <h1><a id="user-content-github-markdown-css-demo" class="anchor" href="#github-markdown-css-demo" aria-hidden="true"><span class="octicon octicon-link"></span></a>GitHub Markdown CSS demo</h1>
  21. <p><a name="user-content-headers"></a></p><a name="user-content-headers">
  22. </a><h2><a name="user-content-headers"></a><a id="user-content-headers" class="anchor" href="#headers" aria-hidden="true"><span class="octicon octicon-link"></span></a>Headers</h2>
  23. <pre lang="no-highlight"><code># H1
  24. ## H2
  25. ### H3
  26. #### H4
  27. ##### H5
  28. ###### H6
  29. Alternatively, for H1 and H2, an underline-ish style:
  30. Alt-H1
  31. ======
  32. Alt-H2
  33. ------
  34. </code></pre>
  35. <h1><a id="user-content-h1" class="anchor" href="#h1" aria-hidden="true"><span class="octicon octicon-link"></span></a>H1</h1>
  36. <h2><a id="user-content-h2" class="anchor" href="#h2" aria-hidden="true"><span class="octicon octicon-link"></span></a>H2</h2>
  37. <h3><a id="user-content-h3" class="anchor" href="#h3" aria-hidden="true"><span class="octicon octicon-link"></span></a>H3</h3>
  38. <h4><a id="user-content-h4" class="anchor" href="#h4" aria-hidden="true"><span class="octicon octicon-link"></span></a>H4</h4>
  39. <h5><a id="user-content-h5" class="anchor" href="#h5" aria-hidden="true"><span class="octicon octicon-link"></span></a>H5</h5>
  40. <h6><a id="user-content-h6" class="anchor" href="#h6" aria-hidden="true"><span class="octicon octicon-link"></span></a>H6</h6>
  41. <p>Alternatively, for H1 and H2, an underline-ish style:</p>
  42. <h1><a id="user-content-alt-h1" class="anchor" href="#alt-h1" aria-hidden="true"><span class="octicon octicon-link"></span></a>Alt-H1</h1>
  43. <h2><a id="user-content-alt-h2" class="anchor" href="#alt-h2" aria-hidden="true"><span class="octicon octicon-link"></span></a>Alt-H2</h2>
  44. <p><a name="user-content-headers"></a><a name="user-content-emphasis"></a></p><a name="user-content-emphasis">
  45. </a><h2><a name="user-content-emphasis"></a><a id="user-content-emphasis" class="anchor" href="#emphasis" aria-hidden="true"><span class="octicon octicon-link"></span></a>Emphasis</h2>
  46. <pre lang="no-highlight"><code>Emphasis, aka italics, with *asterisks* or _underscores_.
  47. Strong emphasis, aka bold, with **asterisks** or __underscores__.
  48. Combined emphasis with **asterisks and _underscores_**.
  49. Strikethrough uses two tildes. ~~Scratch this.~~
  50. </code></pre>
  51. <p>Emphasis, aka italics, with <em>asterisks</em> or <em>underscores</em>.</p>
  52. <p>Strong emphasis, aka bold, with <strong>asterisks</strong> or <strong>underscores</strong>.</p>
  53. <p>Combined emphasis with <strong>asterisks and <em>underscores</em></strong>.</p>
  54. <p>Strikethrough uses two tildes. <del>Scratch this.</del></p>
  55. <p><a name="user-content-emphasis"></a><a name="user-content-lists"></a></p><a name="user-content-lists">
  56. </a><h2><a name="user-content-lists"></a><a id="user-content-lists" class="anchor" href="#lists" aria-hidden="true"><span class="octicon octicon-link"></span></a>Lists</h2>
  57. <p>(In this example, leading and trailing spaces are shown with with dots: ⋅)</p>
  58. <pre lang="no-highlight"><code>1. First ordered list item
  59. 2. Another item
  60. ⋅⋅* Unordered sub-list.
  61. 1. Actual numbers don't matter, just that it's a number
  62. ⋅⋅1. Ordered sub-list
  63. 4. And another item.
  64. ⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).
  65. ⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅
  66. ⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅
  67. ⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)
  68. * Unordered list can use asterisks
  69. - Or minuses
  70. + Or pluses
  71. </code></pre>
  72. <ol>
  73. <li>First ordered list item</li>
  74. <li>Another item
  75. <ul>
  76. <li>Unordered sub-list.</li>
  77. </ul></li>
  78. <li>Actual numbers don't matter, just that it's a number
  79. <ol>
  80. <li>Ordered sub-list</li>
  81. </ol></li>
  82. <li><p>And another item.</p>
  83. <p>You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).</p>
  84. <p>To have a line break without a paragraph, you will need to use two trailing spaces.
  85. Note that this line is separate, but within the same paragraph.
  86. (This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)</p></li>
  87. </ol>
  88. <ul>
  89. <li>Unordered list can use asterisks</li>
  90. <li>Or minuses</li>
  91. <li><p>Or pluses</p></li>
  92. </ul>
  93. <ol>
  94. <li>foo
  95. <ol>
  96. <li>bar
  97. <ol>
  98. <li>baz
  99. <ol>
  100. <li>faz</li>
  101. </ol></li>
  102. </ol></li>
  103. </ol></li>
  104. <li><p>foo2</p></li>
  105. </ol>
  106. <ul>
  107. <li>foo
  108. <ul>
  109. <li>bar
  110. <ul>
  111. <li>baz
  112. <ul>
  113. <li>faz</li>
  114. </ul></li>
  115. </ul></li>
  116. </ul></li>
  117. <li><p>foo2</p></li>
  118. </ul>
  119. <ol>
  120. <li><p>foo</p>
  121. <ul>
  122. <li>bar
  123. <ol>
  124. <li>baz
  125. <ul>
  126. <li>faz</li>
  127. </ul></li>
  128. </ol></li>
  129. </ul></li>
  130. </ol>
  131. <ul>
  132. <li><p>foo</p>
  133. <ol>
  134. <li>bar
  135. <ul>
  136. <li>baz
  137. <ol>
  138. <li>faz</li>
  139. </ol></li>
  140. </ul></li>
  141. </ol></li>
  142. </ul>
  143. <ol>
  144. <li>Lists in a list item:
  145. <ul>
  146. <li>Indented four spaces.
  147. <ul>
  148. <li>indented eight spaces.</li>
  149. </ul></li>
  150. <li>Four spaces again.</li>
  151. </ul></li>
  152. <li><p>Multiple paragraphs in a list items:
  153. It's best to indent the paragraphs four spaces
  154. You can get away with three, but it can get
  155. confusing when you nest other things.
  156. Stick to four.</p>
  157. <p>We indented the first line an extra space to align
  158. it with these paragraphs. In real use, we might do
  159. that to the entire list so that all items line up.</p>
  160. <p>This paragraph is still part of the list item, but it looks messy to humans. So it's a good idea to wrap your nested paragraphs manually, as we did with the first two.</p></li>
  161. <li><p>Blockquotes in a list item:</p>
  162. <blockquote>
  163. <p>Skip a line and
  164. indent the &gt;'s four spaces.</p>
  165. </blockquote></li>
  166. <li><p>Preformatted text in a list item:</p>
  167. <pre><code>Skip a line and indent eight spaces.
  168. That's four spaces for the list
  169. and four to trigger the code block.
  170. </code></pre></li>
  171. </ol>
  172. <h2><a id="user-content-inline-html" class="anchor" href="#inline-html" aria-hidden="true"><span class="octicon octicon-link"></span></a>Inline HTML</h2>
  173. <p>To reboot your computer, press <kbd>ctrl</kbd>+<kbd>alt</kbd>+<kbd>del</kbd>.</p>
  174. <p><a name="user-content-lists"></a><a name="user-content-links"></a></p><a name="user-content-links">
  175. </a><h2><a name="user-content-links"></a><a id="user-content-links" class="anchor" href="#links" aria-hidden="true"><span class="octicon octicon-link"></span></a>Links</h2>
  176. <p>There are two ways to create links.</p>
  177. <pre lang="no-highlight"><code>[I'm an inline-style link](https://www.google.com)
  178. [I'm an inline-style link with title](https://www.google.com "Google's Homepage")
  179. [I'm a reference-style link][Arbitrary case-insensitive reference text]
  180. [I'm a relative reference to a repository file](../blob/master/LICENSE)
  181. [You can use numbers for reference-style link definitions][1]
  182. Or leave it empty and use the [link text itself]
  183. Some text to show that the reference links can follow later.
  184. [arbitrary case-insensitive reference text]: https://www.mozilla.org
  185. [1]: http://slashdot.org
  186. [link text itself]: http://www.reddit.com
  187. </code></pre>
  188. <p><a name="user-content-links"></a><a href="https://www.google.com">I'm an inline-style link</a></p>
  189. <p><a href="https://www.google.com" title="Google's Homepage">I'm an inline-style link with title</a></p>
  190. <p><a href="https://www.mozilla.org">I'm a reference-style link</a></p>
  191. <p><a href="/tylerlong/github-markdown-css-demo/blob/blob/master/LICENSE">I'm a relative reference to a repository file</a></p>
  192. <p><a href="http://slashdot.org">You can use numbers for reference-style link definitions</a></p>
  193. <p>Or leave it empty and use the <a href="http://www.reddit.com">link text itself</a></p>
  194. <p>Some text to show that the reference links can follow later.</p>
  195. <p><a name="user-content-images"></a></p><a name="user-content-images">
  196. </a><h2><a name="user-content-images"></a><a id="user-content-images" class="anchor" href="#images" aria-hidden="true"><span class="octicon octicon-link"></span></a>Images</h2>
  197. <pre lang="no-highlight"><code>Here's our logo (hover to see the title text):
  198. Inline-style:
  199. ![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")
  200. Reference-style:
  201. ![alt text][logo]
  202. [logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
  203. </code></pre>
  204. <p>Here's our logo (hover to see the title text):</p>
  205. <p>Inline-style:
  206. <img src="https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png" alt="alt text" title="Logo Title Text 1" style="max-width:100%;"></p>
  207. <p>Reference-style:
  208. <img src="https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png" alt="alt text" title="Logo Title Text 2" style="max-width:100%;"></p>
  209. <p><a name="user-content-images"></a><a name="user-content-code"></a></p><a name="user-content-code">
  210. </a><h2><a name="user-content-code"></a><a id="user-content-code-and-syntax-highlighting" class="anchor" href="#code-and-syntax-highlighting" aria-hidden="true"><span class="octicon octicon-link"></span></a>Code and Syntax Highlighting</h2>
  211. <p><a name="user-content-code">Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers -- like Github's and <em>Markdown Here</em> -- support syntax highlighting. Which languages are supported and how those language names should be written will vary from renderer to renderer. <em>Markdown Here</em> supports highlighting for dozens of languages (and not-really-languages, like diffs and HTTP headers); to see the complete list, and how to write the language names, see the </a><a href="http://softwaremaniacs.org/media/soft/highlight/test.html">highlight.js demo page</a>.</p>
  212. <pre lang="no-highlight"><code>Inline `code` has `back-ticks around` it.
  213. </code></pre>
  214. <p>Inline <code>code</code> has <code>back-ticks around</code> it.</p>
  215. <p>Blocks of code are either fenced by lines with three back-ticks <code>```</code>, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.</p>
  216. <pre lang="no-highlight"><code>```javascript
  217. var s = "JavaScript syntax highlighting";
  218. alert(s);
  219. ```
  220. ```python
  221. s = "Python syntax highlighting"
  222. print s
  223. ```
  224. ```
  225. No language indicated, so no syntax highlighting.
  226. But let's throw in a &lt;b&gt;tag&lt;/b&gt;.
  227. ```
  228. </code></pre>
  229. <div class="highlight highlight-source-js"><pre><span class="pl-k">var</span> s <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>JavaScript syntax highlighting<span class="pl-pds">"</span></span>;
  230. <span class="pl-c1">alert</span>(s);</pre></div>
  231. <div class="highlight highlight-source-python"><pre>s <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>Python syntax highlighting<span class="pl-pds">"</span></span>
  232. <span class="pl-k">print</span> s</pre></div>
  233. <pre><code>No language indicated, so no syntax highlighting in Markdown Here (varies on Github).
  234. But let's throw in a &lt;b&gt;tag&lt;/b&gt;.
  235. </code></pre>
  236. <p><a name="user-content-tables"></a></p><a name="user-content-tables">
  237. </a><h2><a name="user-content-tables"></a><a id="user-content-tables" class="anchor" href="#tables" aria-hidden="true"><span class="octicon octicon-link"></span></a>Tables</h2>
  238. <p>Tables aren't part of the core Markdown spec, but they are part of GFM and <em>Markdown Here</em> supports them. They are an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application.</p>
  239. <pre lang="no-highlight"><code>Colons can be used to align columns.
  240. | Tables | Are | Cool |
  241. | ------------- |:-------------:| -----:|
  242. | col 3 is | right-aligned | |
  243. | col 2 is | centered | |
  244. | zebra stripes | are neat | |
  245. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.
  246. Markdown | Less | Pretty
  247. --- | --- | ---
  248. *Still* | `renders` | **nicely**
  249. 1 | 2 | 3
  250. </code></pre>
  251. <p>Colons can be used to align columns.</p>
  252. <table><thead>
  253. <tr>
  254. <th>Tables</th>
  255. <th align="center">Are</th>
  256. <th align="right">Cool</th>
  257. </tr>
  258. </thead><tbody>
  259. <tr>
  260. <td>col 3 is</td>
  261. <td align="center">right-aligned</td>
  262. <td align="right"></td>
  263. </tr>
  264. <tr>
  265. <td>col 2 is</td>
  266. <td align="center">centered</td>
  267. <td align="right"></td>
  268. </tr>
  269. <tr>
  270. <td>zebra stripes</td>
  271. <td align="center">are neat</td>
  272. <td align="right"></td>
  273. </tr>
  274. </tbody></table>
  275. <p>The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.</p>
  276. <table><thead>
  277. <tr>
  278. <th>Markdown</th>
  279. <th>Less</th>
  280. <th>Pretty</th>
  281. </tr>
  282. </thead><tbody>
  283. <tr>
  284. <td><em>Still</em></td>
  285. <td><code>renders</code></td>
  286. <td><strong>nicely</strong></td>
  287. </tr>
  288. <tr>
  289. <td>1</td>
  290. <td>2</td>
  291. <td>3</td>
  292. </tr>
  293. </tbody></table>
  294. <p><a name="user-content-tables"></a><a name="user-content-blockquotes"></a></p><a name="user-content-blockquotes">
  295. </a><h2><a name="user-content-blockquotes"></a><a id="user-content-blockquotes" class="anchor" href="#blockquotes" aria-hidden="true"><span class="octicon octicon-link"></span></a>Blockquotes</h2>
  296. <pre lang="no-highlight"><code>&gt; Blockquotes are very handy in email to emulate reply text.
  297. &gt; This line is part of the same quote.
  298. Quote break.
  299. &gt; This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote.
  300. </code></pre>
  301. <blockquote>
  302. <p>Blockquotes are very handy in email to emulate reply text.
  303. This line is part of the same quote.</p>
  304. </blockquote>
  305. <p>Quote break.</p>
  306. <blockquote>
  307. <p>This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can <em>put</em> <strong>Markdown</strong> into a blockquote.</p>
  308. </blockquote>
  309. <p><a name="user-content-blockquotes"></a><a name="user-content-html"></a></p><a name="user-content-html">
  310. </a><h2><a name="user-content-html"></a><a id="user-content-inline-html-1" class="anchor" href="#inline-html-1" aria-hidden="true"><span class="octicon octicon-link"></span></a>Inline HTML</h2>
  311. <p>You can also use raw HTML in your Markdown, and it'll mostly work pretty well.</p>
  312. <pre lang="no-highlight"><code>&lt;dl&gt;
  313. &lt;dt&gt;Definition list&lt;/dt&gt;
  314. &lt;dd&gt;Is something people use sometimes.&lt;/dd&gt;
  315. &lt;dt&gt;Markdown in HTML&lt;/dt&gt;
  316. &lt;dd&gt;Does *not* work **very** well. Use HTML &lt;em&gt;tags&lt;/em&gt;.&lt;/dd&gt;
  317. &lt;/dl&gt;
  318. </code></pre>
  319. <dl>
  320. <dt>Definition list</dt>
  321. <dd>Is something people use sometimes.</dd>
  322. <dt>Markdown in HTML</dt>
  323. <dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
  324. </dl>
  325. <p><a name="user-content-html"></a><a name="user-content-hr"></a></p><a name="user-content-hr">
  326. </a><h2><a name="user-content-hr"></a><a id="user-content-horizontal-rule" class="anchor" href="#horizontal-rule" aria-hidden="true"><span class="octicon octicon-link"></span></a>Horizontal Rule</h2>
  327. <pre><code>Three or more...
  328. ---
  329. Hyphens
  330. ***
  331. Asterisks
  332. ___
  333. Underscores
  334. </code></pre>
  335. <p>Three or more...</p>
  336. <hr>
  337. <p>Hyphens</p>
  338. <hr>
  339. <p>Asterisks</p>
  340. <hr>
  341. <p>Underscores</p>
  342. <p><a name="user-content-hr"></a><a name="user-content-lines"></a></p><a name="user-content-lines">
  343. </a><h2><a name="user-content-lines"></a><a id="user-content-line-breaks" class="anchor" href="#line-breaks" aria-hidden="true"><span class="octicon octicon-link"></span></a>Line Breaks</h2>
  344. <p>My basic recommendation for learning how line breaks work is to experiment and discover -- hit &lt;Enter&gt; once (i.e., insert one newline), then hit it twice (i.e., insert two newlines), see what happens. You'll soon learn to get what you want. "Markdown Toggle" is your friend.</p>
  345. <p>Here are some things to try out:</p>
  346. <pre><code>Here's a line for us to start with.
  347. This line is separated from the one above by two newlines, so it will be a *separate paragraph*.
  348. This line is also a separate paragraph, but...
  349. This line is only separated by a single newline, so it's a separate line in the *same paragraph*.
  350. </code></pre>
  351. <p>Here's a line for us to start with.</p>
  352. <p>This line is separated from the one above by two newlines, so it will be a <em>separate paragraph</em>.</p>
  353. <p>This line is also begins a separate paragraph, but...
  354. This line is only separated by a single newline, so it's a separate line in the <em>same paragraph</em>.</p>
  355. <p>(Technical note: <em>Markdown Here</em> uses GFM line breaks, so there's no need to use MD's two-space line breaks.)</p>
  356. <p><a name="user-content-lines"></a><a name="user-content-videos"></a></p><a name="user-content-videos">
  357. </a><h2><a name="user-content-videos"></a><a id="user-content-youtube-videos" class="anchor" href="#youtube-videos" aria-hidden="true"><span class="octicon octicon-link"></span></a>Youtube videos</h2>
  358. <p>They can't be added directly but you can add an image with a link to the video like this:</p>
  359. <pre lang="no-highlight"><code>&lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;v=YOUTUBE_VIDEO_ID_HERE
  360. " target="_blank"&gt;&lt;img src="http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg"
  361. alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /&gt;&lt;/a&gt;
  362. </code></pre>
  363. <p>Or, in pure Markdown, but losing the image sizing and border:</p>
  364. <pre lang="no-highlight"><code>[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)
  365. </code></pre>
  366. <p>Referencing a bug by #bugID in your git commit links it to the slip. For example #1.</p>
  367. <h2><a id="user-content-task-list" class="anchor" href="#task-list" aria-hidden="true"><span class="octicon octicon-link"></span></a>Task List</h2>
  368. <ul class="task-list">
  369. <li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled"> foo
  370. <ul class="task-list">
  371. <li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled"> foo</li>
  372. <li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" checked="checked" disabled="disabled"> foo</li>
  373. </ul></li>
  374. <li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" checked="checked" disabled="disabled"> foo</li>
  375. </ul>
  376. <p><a name="user-content-videos">[test]: </a><a href="http://google.com/">http://google.com/</a> "Google"</p>
  377. <h1><a id="user-content-a-heading" class="anchor" href="#a-heading" aria-hidden="true"><span class="octicon octicon-link"></span></a>A heading</h1>
  378. <p>Just a note, I've found that I can't test my markdown parser vs others.
  379. For example, both markdown.js and showdown code blocks in lists wrong. They're
  380. also completely [inconsistent][test] with regards to paragraphs in list items.</p>
  381. <p>A link. Not anymore.</p>
  382. <p></p>This will make me fail the test because
  383. markdown.js doesnt acknowledge arbitrary html blocks =/<p></p>
  384. <ul>
  385. <li><p>List Item 1</p></li>
  386. <li><p>List Item 2</p>
  387. <ul>
  388. <li>New List Item 1
  389. Hi, this is a list item.</li>
  390. <li>New List Item 2
  391. Another item
  392. Code goes here.
  393. Lots of it...</li>
  394. <li>New List Item 3
  395. The last item</li>
  396. </ul></li>
  397. <li><p>List Item 3
  398. The final item.</p></li>
  399. <li><p>List Item 4
  400. The real final item.</p></li>
  401. </ul>
  402. <p>Paragraph.</p>
  403. <blockquote>
  404. <ul>
  405. <li>bq Item 1</li>
  406. <li>bq Item 2
  407. <ul>
  408. <li>New bq Item 1</li>
  409. <li>New bq Item 2
  410. Text here</li>
  411. </ul></li>
  412. </ul>
  413. </blockquote>
  414. <hr>
  415. <blockquote>
  416. <p>Another blockquote!
  417. I really need to get
  418. more creative with
  419. mockup text..
  420. markdown.js breaks here again</p>
  421. </blockquote>
  422. <h2><a id="user-content-another-heading" class="anchor" href="#another-heading" aria-hidden="true"><span class="octicon octicon-link"></span></a>Another Heading</h2>
  423. <p>Hello <em>world</em>. Here is a <a href="//hello">link</a>.
  424. And an image <a href="/tylerlong/github-markdown-css-demo/blob/master/src" target="_blank"><img src="/tylerlong/github-markdown-css-demo/raw/master/src" alt="alt" style="max-width:100%;"></a>.</p>
  425. <pre><code>Code goes here.
  426. Lots of it...
  427. </code></pre>
  428. <blockquote>
  429. <p>A list within a blockquote:</p>
  430. <ul>
  431. <li>asterisk 1</li>
  432. <li>asterisk 2</li>
  433. <li>asterisk 3</li>
  434. </ul>
  435. </blockquote>
  436. <p><strong><em>This is strong and em.</em></strong></p>
  437. <p>So is <strong><em>this</em></strong> word.</p>
  438. <p><strong><em>This is strong and em.</em></strong></p>
  439. <p>So is <strong><em>this</em></strong> word.</p>
  440. <h2><a id="user-content-unordered" class="anchor" href="#unordered" aria-hidden="true"><span class="octicon octicon-link"></span></a>Unordered</h2>
  441. <p>Asterisks tight:</p>
  442. <ul>
  443. <li> asterisk 1</li>
  444. <li> asterisk 2</li>
  445. <li> asterisk 3</li>
  446. </ul>
  447. <p>Asterisks loose:</p>
  448. <ul>
  449. <li><p>asterisk 1</p></li>
  450. <li><p>asterisk 2</p></li>
  451. <li><p>asterisk 3</p></li>
  452. </ul>
  453. <hr>
  454. <p>Pluses tight:</p>
  455. <ul>
  456. <li> Plus 1</li>
  457. <li> Plus 2</li>
  458. <li> Plus 3</li>
  459. </ul>
  460. <p>Pluses loose:</p>
  461. <ul>
  462. <li><p>Plus 1</p></li>
  463. <li><p>Plus 2</p></li>
  464. <li><p>Plus 3</p></li>
  465. </ul>
  466. <hr>
  467. <p>Minuses tight:</p>
  468. <ul>
  469. <li> Minus 1</li>
  470. <li> Minus 2</li>
  471. <li> Minus 3</li>
  472. </ul>
  473. <p>Minuses loose:</p>
  474. <ul>
  475. <li><p>Minus 1</p></li>
  476. <li><p>Minus 2</p></li>
  477. <li><p>Minus 3</p></li>
  478. </ul>
  479. <h2><a id="user-content-ordered" class="anchor" href="#ordered" aria-hidden="true"><span class="octicon octicon-link"></span></a>Ordered</h2>
  480. <p>Tight:</p>
  481. <ol>
  482. <li> First</li>
  483. <li> Second</li>
  484. <li> Third</li>
  485. </ol>
  486. <p>and:</p>
  487. <ol>
  488. <li>One</li>
  489. <li>Two</li>
  490. <li>Three</li>
  491. </ol>
  492. <p>Loose using tabs:</p>
  493. <ol>
  494. <li><p>First</p></li>
  495. <li><p>Second</p></li>
  496. <li><p>Third</p></li>
  497. </ol>
  498. <p>and using spaces:</p>
  499. <ol>
  500. <li><p>One</p></li>
  501. <li><p>Two</p></li>
  502. <li><p>Three</p></li>
  503. </ol>
  504. <p>Multiple paragraphs:</p>
  505. <ol>
  506. <li><p>Item 1, graf one.</p>
  507. <p>Item 2. graf two. The quick brown fox jumped over the lazy dog's
  508. back.</p></li>
  509. <li><p>Item 2.</p></li>
  510. <li><p>Item 3.</p></li>
  511. </ol>
  512. <h2><a id="user-content-nested" class="anchor" href="#nested" aria-hidden="true"><span class="octicon octicon-link"></span></a>Nested</h2>
  513. <ul>
  514. <li> Tab
  515. <ul>
  516. <li> Tab
  517. <ul>
  518. <li> Tab</li>
  519. </ul></li>
  520. </ul></li>
  521. </ul>
  522. <p>Here's another:</p>
  523. <ol>
  524. <li>First</li>
  525. <li>Second:
  526. <ul>
  527. <li>Fee</li>
  528. <li>Fie</li>
  529. <li>Foe</li>
  530. </ul></li>
  531. <li>Third</li>
  532. </ol>
  533. <p>Same thing but with paragraphs:</p>
  534. <ol>
  535. <li><p>First</p></li>
  536. <li><p>Second:</p>
  537. <ul>
  538. <li>Fee</li>
  539. <li>Fie</li>
  540. <li>Foe</li>
  541. </ul></li>
  542. <li><p>Third</p></li>
  543. </ol>
  544. <p>This was an error in Markdown 1.0.1:</p>
  545. <ul>
  546. <li><p>this</p>
  547. <ul>
  548. <li> sub</li>
  549. </ul>
  550. <p>that</p></li>
  551. </ul>
  552. <blockquote>
  553. <p>foo</p>
  554. <blockquote>
  555. <p>bar</p>
  556. </blockquote>
  557. <p>foo</p>
  558. </blockquote>
  559. <h1><a id="user-content-markdown-syntax" class="anchor" href="#markdown-syntax" aria-hidden="true"><span class="octicon octicon-link"></span></a>Markdown: Syntax</h1>
  560. <ul id="user-content-ProjectSubmenu">
  561. <li><a href="/tylerlong/github-markdown-css-demo/blob/master/projects/markdown" title="Markdown Project Page">Main</a></li>
  562. <li><a href="/tylerlong/github-markdown-css-demo/blob/master/projects/markdown/basics" title="Markdown Basics">Basics</a></li>
  563. <li>Syntax</li>
  564. <li><a href="/tylerlong/github-markdown-css-demo/blob/master/projects/markdown/license" title="Pricing and License Information">License</a></li>
  565. <li><a href="/tylerlong/github-markdown-css-demo/blob/master/projects/markdown/dingus" title="Online Markdown Web Form">Dingus</a></li>
  566. </ul>
  567. <ul>
  568. <li> <a href="#overview">Overview</a>
  569. <ul>
  570. <li> <a href="#philosophy">Philosophy</a></li>
  571. <li> <a href="#html">Inline HTML</a></li>
  572. <li> <a href="#autoescape">Automatic Escaping for Special Characters</a></li>
  573. </ul></li>
  574. <li> <a href="#block">Block Elements</a>
  575. <ul>
  576. <li> <a href="#p">Paragraphs and Line Breaks</a></li>
  577. <li> <a href="#header">Headers</a></li>
  578. <li> <a href="#blockquote">Blockquotes</a></li>
  579. <li> <a href="#list">Lists</a></li>
  580. <li> <a href="#precode">Code Blocks</a></li>
  581. <li> <a href="#hr">Horizontal Rules</a></li>
  582. </ul></li>
  583. <li> <a href="#span">Span Elements</a>
  584. <ul>
  585. <li> <a href="#link">Links</a></li>
  586. <li> <a href="#em">Emphasis</a></li>
  587. <li> <a href="#code">Code</a></li>
  588. <li> <a href="#img">Images</a></li>
  589. </ul></li>
  590. <li> <a href="#misc">Miscellaneous</a>
  591. <ul>
  592. <li> <a href="#backslash">Backslash Escapes</a></li>
  593. <li> <a href="#autolink">Automatic Links</a></li>
  594. </ul></li>
  595. </ul>
  596. <p><strong>Note:</strong> This document is itself written using Markdown; you
  597. can [see the source for it by adding '.text' to the URL][src].</p>
  598. <p>[src]: /projects/markdown/syntax.text</p>
  599. <hr>
  600. <h2 id="user-content-overview"><a id="user-content-overview" class="anchor" href="#overview" aria-hidden="true"><span class="octicon octicon-link"></span></a>Overview</h2>
  601. <h3 id="user-content-philosophy"><a id="user-content-philosophy" class="anchor" href="#philosophy" aria-hidden="true"><span class="octicon octicon-link"></span></a>Philosophy</h3>
  602. <p>Markdown is intended to be as easy-to-read and easy-to-write as is feasible.</p>
  603. <p>Readability, however, is emphasized above all else. A Markdown-formatted
  604. document should be publishable as-is, as plain text, without looking
  605. like it's been marked up with tags or formatting instructions. While
  606. Markdown's syntax has been influenced by several existing text-to-HTML
  607. filters -- including <a href="http://slashdot.org">Setext</a>, [atx] [2], [Textile] [3], [reStructuredText] [4],
  608. [Grutatext] [5], and [EtText] [6] -- the single biggest source of
  609. inspiration for Markdown's syntax is the format of plain text email.</p>
  610. <p><a href="http://slashdot.org">1</a>: <a href="http://docutils.sourceforge.net/mirror/setext.html">http://docutils.sourceforge.net/mirror/setext.html</a>
  611. [2]: <a href="http://www.aaronsw.com/2002/atx/">http://www.aaronsw.com/2002/atx/</a>
  612. [3]: <a href="http://textism.com/tools/textile/">http://textism.com/tools/textile/</a>
  613. [4]: <a href="http://docutils.sourceforge.net/rst.html">http://docutils.sourceforge.net/rst.html</a>
  614. [5]: <a href="http://www.triptico.com/software/grutatxt.html">http://www.triptico.com/software/grutatxt.html</a>
  615. [6]: <a href="http://ettext.taint.org/doc/">http://ettext.taint.org/doc/</a></p>
  616. <p>To this end, Markdown's syntax is comprised entirely of punctuation
  617. characters, which punctuation characters have been carefully chosen so
  618. as to look like what they mean. E.g., asterisks around a word actually
  619. look like *emphasis*. Markdown lists look like, well, lists. Even
  620. blockquotes look like quoted passages of text, assuming you've ever
  621. used email.</p>
  622. <h3 id="user-content-html"><a id="user-content-inline-html-2" class="anchor" href="#inline-html-2" aria-hidden="true"><span class="octicon octicon-link"></span></a>Inline HTML</h3>
  623. <p>Markdown's syntax is intended for one purpose: to be used as a
  624. format for <em>writing</em> for the web.</p>
  625. <p>Markdown is not a replacement for HTML, or even close to it. Its
  626. syntax is very small, corresponding only to a very small subset of
  627. HTML tags. The idea is <em>not</em> to create a syntax that makes it easier
  628. to insert HTML tags. In my opinion, HTML tags are already easy to
  629. insert. The idea for Markdown is to make it easy to read, write, and
  630. edit prose. HTML is a <em>publishing</em> format; Markdown is a <em>writing</em>
  631. format. Thus, Markdown's formatting syntax only addresses issues that
  632. can be conveyed in plain text.</p>
  633. <p>For any markup that is not covered by Markdown's syntax, you simply
  634. use HTML itself. There's no need to preface it or delimit it to
  635. indicate that you're switching from Markdown to HTML; you just use
  636. the tags.</p>
  637. <p>The only restrictions are that block-level HTML elements -- e.g. <code>&lt;div&gt;</code>,
  638. <code>&lt;table&gt;</code>, <code>&lt;pre&gt;</code>, <code>&lt;p&gt;</code>, etc. -- must be separated from surrounding
  639. content by blank lines, and the start and end tags of the block should
  640. not be indented with tabs or spaces. Markdown is smart enough not
  641. to add extra (unwanted) <code>&lt;p&gt;</code> tags around HTML block-level tags.</p>
  642. <p>For example, to add an HTML table to a Markdown article:</p>
  643. <pre><code>This is a regular paragraph.
  644. &lt;table&gt;
  645. &lt;tr&gt;
  646. &lt;td&gt;Foo&lt;/td&gt;
  647. &lt;/tr&gt;
  648. &lt;/table&gt;
  649. This is another regular paragraph.
  650. </code></pre>
  651. <p>Note that Markdown formatting syntax is not processed within block-level
  652. HTML tags. E.g., you can't use Markdown-style <code>*emphasis*</code> inside an
  653. HTML block.</p>
  654. <p>Span-level HTML tags -- e.g. <code>&lt;span&gt;</code>, <code>&lt;cite&gt;</code>, or <code>&lt;del&gt;</code> -- can be
  655. used anywhere in a Markdown paragraph, list item, or header. If you
  656. want, you can even use HTML tags instead of Markdown formatting; e.g. if
  657. you'd prefer to use HTML <code>&lt;a&gt;</code> or <code>&lt;img&gt;</code> tags instead of Markdown's
  658. link or image syntax, go right ahead.</p>
  659. <p>Unlike block-level HTML tags, Markdown syntax <em>is</em> processed within
  660. span-level tags.</p>
  661. <h3 id="user-content-autoescape"><a id="user-content-automatic-escaping-for-special-characters" class="anchor" href="#automatic-escaping-for-special-characters" aria-hidden="true"><span class="octicon octicon-link"></span></a>Automatic Escaping for Special Characters</h3>
  662. <p>In HTML, there are two characters that demand special treatment: <code>&lt;</code>
  663. and <code>&amp;</code>. Left angle brackets are used to start tags; ampersands are
  664. used to denote HTML entities. If you want to use them as literal
  665. characters, you must escape them as entities, e.g. <code>&amp;lt;</code>, and
  666. <code>&amp;amp;</code>.</p>
  667. <p>Ampersands in particular are bedeviling for web writers. If you want to
  668. write about 'AT&amp;T', you need to write '<code>AT&amp;amp;T</code>'. You even need to
  669. escape ampersands within URLs. Thus, if you want to link to:</p>
  670. <pre><code>http://images.google.com/images?num=30&amp;q=larry+bird
  671. </code></pre>
  672. <p>you need to encode the URL as:</p>
  673. <pre><code>http://images.google.com/images?num=30&amp;amp;q=larry+bird
  674. </code></pre>
  675. <p>in your anchor tag <code>href</code> attribute. Needless to say, this is easy to
  676. forget, and is probably the single most common source of HTML validation
  677. errors in otherwise well-marked-up web sites.</p>
  678. <p>Markdown allows you to use these characters naturally, taking care of
  679. all the necessary escaping for you. If you use an ampersand as part of
  680. an HTML entity, it remains unchanged; otherwise it will be translated
  681. into <code>&amp;amp;</code>.</p>
  682. <p>So, if you want to include a copyright symbol in your article, you can write:</p>
  683. <pre><code>&amp;copy;
  684. </code></pre>
  685. <p>and Markdown will leave it alone. But if you write:</p>
  686. <pre><code>AT&amp;T
  687. </code></pre>
  688. <p>Markdown will translate it to:</p>
  689. <pre><code>AT&amp;amp;T
  690. </code></pre>
  691. <p>Similarly, because Markdown supports <a href="#html">inline HTML</a>, if you use
  692. angle brackets as delimiters for HTML tags, Markdown will treat them as
  693. such. But if you write:</p>
  694. <pre><code>4 &lt; 5
  695. </code></pre>
  696. <p>Markdown will translate it to:</p>
  697. <pre><code>4 &amp;lt; 5
  698. </code></pre>
  699. <p>However, inside Markdown code spans and blocks, angle brackets and
  700. ampersands are <em>always</em> encoded automatically. This makes it easy to use
  701. Markdown to write about HTML code. (As opposed to raw HTML, which is a
  702. terrible format for writing about HTML syntax, because every single <code>&lt;</code>
  703. and <code>&amp;</code> in your example code needs to be escaped.)</p>
  704. <hr>
  705. <h2 id="user-content-block"><a id="user-content-block-elements" class="anchor" href="#block-elements" aria-hidden="true"><span class="octicon octicon-link"></span></a>Block Elements</h2>
  706. <h3 id="user-content-p"><a id="user-content-paragraphs-and-line-breaks" class="anchor" href="#paragraphs-and-line-breaks" aria-hidden="true"><span class="octicon octicon-link"></span></a>Paragraphs and Line Breaks</h3>
  707. <p>A paragraph is simply one or more consecutive lines of text, separated
  708. by one or more blank lines. (A blank line is any line that looks like a
  709. blank line -- a line containing nothing but spaces or tabs is considered
  710. blank.) Normal paragraphs should not be intended with spaces or tabs.</p>
  711. <p>The implication of the "one or more consecutive lines of text" rule is
  712. that Markdown supports "hard-wrapped" text paragraphs. This differs
  713. significantly from most other text-to-HTML formatters (including Movable
  714. Type's "Convert Line Breaks" option) which translate every line break
  715. character in a paragraph into a <code>&lt;br /&gt;</code> tag.</p>
  716. <p>When you <em>do</em> want to insert a <code>&lt;br /&gt;</code> break tag using Markdown, you
  717. end a line with two or more spaces, then type return.</p>
  718. <p>Yes, this takes a tad more effort to create a <code>&lt;br /&gt;</code>, but a simplistic
  719. "every line break is a <code>&lt;br /&gt;</code>" rule wouldn't work for Markdown.
  720. Markdown's email-style [blockquoting][bq] and multi-paragraph [list items][l]
  721. work best -- and look better -- when you format them with hard breaks.</p>
  722. <p>[bq]: #blockquote
  723. [l]: #list</p>
  724. <h3 id="user-content-header"><a id="user-content-headers-1" class="anchor" href="#headers-1" aria-hidden="true"><span class="octicon octicon-link"></span></a>Headers</h3>
  725. <p>Markdown supports two styles of headers, <a href="http://slashdot.org">Setext</a> and [atx] [2].</p>
  726. <p>Setext-style headers are "underlined" using equal signs (for first-level
  727. headers) and dashes (for second-level headers). For example:</p>
  728. <pre><code>This is an H1
  729. =============
  730. This is an H2
  731. -------------
  732. </code></pre>
  733. <p>Any number of underlining <code>=</code>'s or <code>-</code>'s will work.</p>
  734. <p>Atx-style headers use 1-6 hash characters at the start of the line,
  735. corresponding to header levels 1-6. For example:</p>
  736. <pre><code># This is an H1
  737. ## This is an H2
  738. ###### This is an H6
  739. </code></pre>
  740. <p>Optionally, you may "close" atx-style headers. This is purely
  741. cosmetic -- you can use this if you think it looks better. The
  742. closing hashes don't even need to match the number of hashes
  743. used to open the header. (The number of opening hashes
  744. determines the header level.) :</p>
  745. <pre><code># This is an H1 #
  746. ## This is an H2 ##
  747. ### This is an H3 ######
  748. </code></pre>
  749. <h3 id="user-content-blockquote"><a id="user-content-blockquotes-1" class="anchor" href="#blockquotes-1" aria-hidden="true"><span class="octicon octicon-link"></span></a>Blockquotes</h3>
  750. <p>Markdown uses email-style <code>&gt;</code> characters for blockquoting. If you're
  751. familiar with quoting passages of text in an email message, then you
  752. know how to create a blockquote in Markdown. It looks best if you hard
  753. wrap the text and put a <code>&gt;</code> before every line:</p>
  754. <pre><code>&gt; This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
  755. &gt; consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
  756. &gt; Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
  757. &gt;
  758. &gt; Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
  759. &gt; id sem consectetuer libero luctus adipiscing.
  760. </code></pre>
  761. <p>Markdown allows you to be lazy and only put the <code>&gt;</code> before the first
  762. line of a hard-wrapped paragraph:</p>
  763. <pre><code>&gt; This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
  764. consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
  765. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
  766. &gt; Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
  767. id sem consectetuer libero luctus adipiscing.
  768. </code></pre>
  769. <p>Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by
  770. adding additional levels of <code>&gt;</code>:</p>
  771. <pre><code>&gt; This is the first level of quoting.
  772. &gt;
  773. &gt; &gt; This is nested blockquote.
  774. &gt;
  775. &gt; Back to the first level.
  776. </code></pre>
  777. <p>Blockquotes can contain other Markdown elements, including headers, lists,
  778. and code blocks:</p>
  779. <pre><code>&gt; ## This is a header.
  780. &gt;
  781. &gt; 1. This is the first list item.
  782. &gt; 2. This is the second list item.
  783. &gt;
  784. &gt; Here's some example code:
  785. &gt;
  786. &gt; return shell_exec("echo $input | $markdown_script");
  787. </code></pre>
  788. <p>Any decent text editor should make email-style quoting easy. For
  789. example, with BBEdit, you can make a selection and choose Increase
  790. Quote Level from the Text menu.</p>
  791. <h3 id="user-content-list"><a id="user-content-lists-1" class="anchor" href="#lists-1" aria-hidden="true"><span class="octicon octicon-link"></span></a>Lists</h3>
  792. <p>Markdown supports ordered (numbered) and unordered (bulleted) lists.</p>
  793. <p>Unordered lists use asterisks, pluses, and hyphens -- interchangably
  794. -- as list markers:</p>
  795. <pre><code>* Red
  796. * Green
  797. * Blue
  798. </code></pre>
  799. <p>is equivalent to:</p>
  800. <pre><code>+ Red
  801. + Green
  802. + Blue
  803. </code></pre>
  804. <p>and:</p>
  805. <pre><code>- Red
  806. - Green
  807. - Blue
  808. </code></pre>
  809. <p>Ordered lists use numbers followed by periods:</p>
  810. <pre><code>1. Bird
  811. 2. McHale
  812. 3. Parish
  813. </code></pre>
  814. <p>It's important to note that the actual numbers you use to mark the
  815. list have no effect on the HTML output Markdown produces. The HTML
  816. Markdown produces from the above list is:</p>
  817. <pre><code>&lt;ol&gt;
  818. &lt;li&gt;Bird&lt;/li&gt;
  819. &lt;li&gt;McHale&lt;/li&gt;
  820. &lt;li&gt;Parish&lt;/li&gt;
  821. &lt;/ol&gt;
  822. </code></pre>
  823. <p>If you instead wrote the list in Markdown like this:</p>
  824. <pre><code>1. Bird
  825. 1. McHale
  826. 1. Parish
  827. </code></pre>
  828. <p>or even:</p>
  829. <pre><code>3. Bird
  830. 1. McHale
  831. 8. Parish
  832. </code></pre>
  833. <p>you'd get the exact same HTML output. The point is, if you want to,
  834. you can use ordinal numbers in your ordered Markdown lists, so that
  835. the numbers in your source match the numbers in your published HTML.
  836. But if you want to be lazy, you don't have to.</p>
  837. <p>If you do use lazy list numbering, however, you should still start the
  838. list with the number 1. At some point in the future, Markdown may support
  839. starting ordered lists at an arbitrary number.</p>
  840. <p>List markers typically start at the left margin, but may be indented by
  841. up to three spaces. List markers must be followed by one or more spaces
  842. or a tab.</p>
  843. <p>To make lists look nice, you can wrap items with hanging indents:</p>
  844. <pre><code>* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  845. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
  846. viverra nec, fringilla in, laoreet vitae, risus.
  847. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
  848. Suspendisse id sem consectetuer libero luctus adipiscing.
  849. </code></pre>
  850. <p>But if you want to be lazy, you don't have to:</p>
  851. <pre><code>* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  852. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
  853. viverra nec, fringilla in, laoreet vitae, risus.
  854. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
  855. Suspendisse id sem consectetuer libero luctus adipiscing.
  856. </code></pre>
  857. <p>If list items are separated by blank lines, Markdown will wrap the
  858. items in <code>&lt;p&gt;</code> tags in the HTML output. For example, this input:</p>
  859. <pre><code>* Bird
  860. * Magic
  861. </code></pre>
  862. <p>will turn into:</p>
  863. <pre><code>&lt;ul&gt;
  864. &lt;li&gt;Bird&lt;/li&gt;
  865. &lt;li&gt;Magic&lt;/li&gt;
  866. &lt;/ul&gt;
  867. </code></pre>
  868. <p>But this:</p>
  869. <pre><code>* Bird
  870. * Magic
  871. </code></pre>
  872. <p>will turn into:</p>
  873. <pre><code>&lt;ul&gt;
  874. &lt;li&gt;&lt;p&gt;Bird&lt;/p&gt;&lt;/li&gt;
  875. &lt;li&gt;&lt;p&gt;Magic&lt;/p&gt;&lt;/li&gt;
  876. &lt;/ul&gt;
  877. </code></pre>
  878. <p>List items may consist of multiple paragraphs. Each subsequent
  879. paragraph in a list item must be intended by either 4 spaces
  880. or one tab:</p>
  881. <pre><code>1. This is a list item with two paragraphs. Lorem ipsum dolor
  882. sit amet, consectetuer adipiscing elit. Aliquam hendrerit
  883. mi posuere lectus.
  884. Vestibulum enim wisi, viverra nec, fringilla in, laoreet
  885. vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
  886. sit amet velit.
  887. 2. Suspendisse id sem consectetuer libero luctus adipiscing.
  888. </code></pre>
  889. <p>It looks nice if you indent every line of the subsequent
  890. paragraphs, but here again, Markdown will allow you to be
  891. lazy:</p>
  892. <pre><code>* This is a list item with two paragraphs.
  893. This is the second paragraph in the list item. You're
  894. only required to indent the first line. Lorem ipsum dolor
  895. sit amet, consectetuer adipiscing elit.
  896. * Another item in the same list.
  897. </code></pre>
  898. <p>To put a blockquote within a list item, the blockquote's <code>&gt;</code>
  899. delimiters need to be indented:</p>
  900. <pre><code>* A list item with a blockquote:
  901. &gt; This is a blockquote
  902. &gt; inside a list item.
  903. </code></pre>
  904. <p>To put a code block within a list item, the code block needs
  905. to be indented <em>twice</em> -- 8 spaces or two tabs:</p>
  906. <pre><code>* A list item with a code block:
  907. &lt;code goes here&gt;
  908. </code></pre>
  909. <p>It's worth noting that it's possible to trigger an ordered list by
  910. accident, by writing something like this:</p>
  911. <pre><code>1986. What a great season.
  912. </code></pre>
  913. <p>In other words, a <em>number-period-space</em> sequence at the beginning of a
  914. line. To avoid this, you can backslash-escape the period:</p>
  915. <pre><code>1986\. What a great season.
  916. </code></pre>
  917. <h3 id="user-content-precode"><a id="user-content-code-blocks" class="anchor" href="#code-blocks" aria-hidden="true"><span class="octicon octicon-link"></span></a>Code Blocks</h3>
  918. <p>Pre-formatted code blocks are used for writing about programming or
  919. markup source code. Rather than forming normal paragraphs, the lines
  920. of a code block are interpreted literally. Markdown wraps a code block
  921. in both <code>&lt;pre&gt;</code> and <code>&lt;code&gt;</code> tags.</p>
  922. <p>To produce a code block in Markdown, simply indent every line of the
  923. block by at least 4 spaces or 1 tab. For example, given this input:</p>
  924. <pre><code>This is a normal paragraph:
  925. This is a code block.
  926. </code></pre>
  927. <p>Markdown will generate:</p>
  928. <pre><code>&lt;p&gt;This is a normal paragraph:&lt;/p&gt;
  929. &lt;pre&gt;&lt;code&gt;This is a code block.
  930. &lt;/code&gt;&lt;/pre&gt;
  931. </code></pre>
  932. <p>One level of indentation -- 4 spaces or 1 tab -- is removed from each
  933. line of the code block. For example, this:</p>
  934. <pre><code>Here is an example of AppleScript:
  935. tell application "Foo"
  936. beep
  937. end tell
  938. </code></pre>
  939. <p>will turn into:</p>
  940. <pre><code>&lt;p&gt;Here is an example of AppleScript:&lt;/p&gt;
  941. &lt;pre&gt;&lt;code&gt;tell application "Foo"
  942. beep
  943. end tell
  944. &lt;/code&gt;&lt;/pre&gt;
  945. </code></pre>
  946. <p>A code block continues until it reaches a line that is not indented
  947. (or the end of the article).</p>
  948. <p>Within a code block, ampersands (<code>&amp;</code>) and angle brackets (<code>&lt;</code> and <code>&gt;</code>)
  949. are automatically converted into HTML entities. This makes it very
  950. easy to include example HTML source code using Markdown -- just paste
  951. it and indent it, and Markdown will handle the hassle of encoding the
  952. ampersands and angle brackets. For example, this:</p>
  953. <pre><code> &lt;div class="footer"&gt;
  954. &amp;copy; 2004 Foo Corporation
  955. &lt;/div&gt;
  956. </code></pre>
  957. <p>will turn into:</p>
  958. <pre><code>&lt;pre&gt;&lt;code&gt;&amp;lt;div class="footer"&amp;gt;
  959. &amp;amp;copy; 2004 Foo Corporation
  960. &amp;lt;/div&amp;gt;
  961. &lt;/code&gt;&lt;/pre&gt;
  962. </code></pre>
  963. <p>Regular Markdown syntax is not processed within code blocks. E.g.,
  964. asterisks are just literal asterisks within a code block. This means
  965. it's also easy to use Markdown to write about Markdown's own syntax.</p>
  966. <h3 id="user-content-hr"><a id="user-content-horizontal-rules" class="anchor" href="#horizontal-rules" aria-hidden="true"><span class="octicon octicon-link"></span></a>Horizontal Rules</h3>
  967. <p>You can produce a horizontal rule tag (<code>&lt;hr /&gt;</code>) by placing three or
  968. more hyphens, asterisks, or underscores on a line by themselves. If you
  969. wish, you may use spaces between the hyphens or asterisks. Each of the
  970. following lines will produce a horizontal rule:</p>
  971. <pre><code>* * *
  972. ***
  973. *****
  974. - - -
  975. ---------------------------------------
  976. _ _ _
  977. </code></pre>
  978. <hr>
  979. <h2 id="user-content-span"><a id="user-content-span-elements" class="anchor" href="#span-elements" aria-hidden="true"><span class="octicon octicon-link"></span></a>Span Elements</h2>
  980. <h3 id="user-content-link"><a id="user-content-links-1" class="anchor" href="#links-1" aria-hidden="true"><span class="octicon octicon-link"></span></a>Links</h3>
  981. <p>Markdown supports two style of links: <em>inline</em> and <em>reference</em>.</p>
  982. <p>In both styles, the link text is delimited by [square brackets].</p>
  983. <p>To create an inline link, use a set of regular parentheses immediately
  984. after the link text's closing square bracket. Inside the parentheses,
  985. put the URL where you want the link to point, along with an <em>optional</em>
  986. title for the link, surrounded in quotes. For example:</p>
  987. <pre><code>This is [an example](http://example.com/ "Title") inline link.
  988. [This link](http://example.net/) has no title attribute.
  989. </code></pre>
  990. <p>Will produce:</p>
  991. <pre><code>&lt;p&gt;This is &lt;a href="http://example.com/" title="Title"&gt;
  992. an example&lt;/a&gt; inline link.&lt;/p&gt;
  993. &lt;p&gt;&lt;a href="http://example.net/"&gt;This link&lt;/a&gt; has no
  994. title attribute.&lt;/p&gt;
  995. </code></pre>
  996. <p>If you're referring to a local resource on the same server, you can
  997. use relative paths:</p>
  998. <pre><code>See my [About](/about/) page for details.
  999. </code></pre>
  1000. <p>Reference-style links use a second set of square brackets, inside
  1001. which you place a label of your choosing to identify the link:</p>
  1002. <pre><code>This is [an example][id] reference-style link.
  1003. </code></pre>
  1004. <p>You can optionally use a space to separate the sets of brackets:</p>
  1005. <pre><code>This is [an example] [id] reference-style link.
  1006. </code></pre>
  1007. <p>Then, anywhere in the document, you define your link label like this,
  1008. on a line by itself:</p>
  1009. <pre><code>[id]: http://example.com/ "Optional Title Here"
  1010. </code></pre>
  1011. <p>That is:</p>
  1012. <ul>
  1013. <li> Square brackets containing the link identifier (optionally
  1014. indented from the left margin using up to three spaces);</li>
  1015. <li> followed by a colon;</li>
  1016. <li> followed by one or more spaces (or tabs);</li>
  1017. <li> followed by the URL for the link;</li>
  1018. <li> optionally followed by a title attribute for the link, enclosed
  1019. in double or single quotes.</li>
  1020. </ul>
  1021. <p>The link URL may, optionally, be surrounded by angle brackets:</p>
  1022. <pre><code>[id]: &lt;http://example.com/&gt; "Optional Title Here"
  1023. </code></pre>
  1024. <p>You can put the title attribute on the next line and use extra spaces
  1025. or tabs for padding, which tends to look better with longer URLs:</p>
  1026. <pre><code>[id]: http://example.com/longish/path/to/resource/here
  1027. "Optional Title Here"
  1028. </code></pre>
  1029. <p>Link definitions are only used for creating links during Markdown
  1030. processing, and are stripped from your document in the HTML output.</p>
  1031. <p>Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are <em>not</em> case sensitive. E.g. these two links:</p>
  1032. <pre><code>[link text][a]
  1033. [link text][A]
  1034. </code></pre>
  1035. <p>are equivalent.</p>
  1036. <p>The <em>implicit link name</em> shortcut allows you to omit the name of the
  1037. link, in which case the link text itself is used as the name.
  1038. Just use an empty set of square brackets -- e.g., to link the word
  1039. "Google" to the google.com web site, you could simply write:</p>
  1040. <pre><code>[Google][]
  1041. </code></pre>
  1042. <p>And then define the link:</p>
  1043. <pre><code>[Google]: http://google.com/
  1044. </code></pre>
  1045. <p>Because link names may contain spaces, this shortcut even works for
  1046. multiple words in the link text:</p>
  1047. <pre><code>Visit [Daring Fireball][] for more information.
  1048. </code></pre>
  1049. <p>And then define the link:</p>
  1050. <pre><code>[Daring Fireball]: http://daringfireball.net/
  1051. </code></pre>
  1052. <p>Link definitions can be placed anywhere in your Markdown document. I
  1053. tend to put them immediately after each paragraph in which they're
  1054. used, but if you want, you can put them all at the end of your
  1055. document, sort of like footnotes.</p>
  1056. <p>Here's an example of reference links in action:</p>
  1057. <pre><code>I get 10 times more traffic from [Google] [1] than from
  1058. [Yahoo] [2] or [MSN] [3].
  1059. [1]: http://google.com/ "Google"
  1060. [2]: http://search.yahoo.com/ "Yahoo Search"
  1061. [3]: http://search.msn.com/ "MSN Search"
  1062. </code></pre>
  1063. <p>Using the implicit link name shortcut, you could instead write:</p>
  1064. <pre><code>I get 10 times more traffic from [Google][] than from
  1065. [Yahoo][] or [MSN][].
  1066. [google]: http://google.com/ "Google"
  1067. [yahoo]: http://search.yahoo.com/ "Yahoo Search"
  1068. [msn]: http://search.msn.com/ "MSN Search"
  1069. </code></pre>
  1070. <p>Both of the above examples will produce the following HTML output:</p>
  1071. <pre><code>&lt;p&gt;I get 10 times more traffic from &lt;a href="http://google.com/"
  1072. title="Google"&gt;Google&lt;/a&gt; than from
  1073. &lt;a href="http://search.yahoo.com/" title="Yahoo Search"&gt;Yahoo&lt;/a&gt;
  1074. or &lt;a href="http://search.msn.com/" title="MSN Search"&gt;MSN&lt;/a&gt;.&lt;/p&gt;
  1075. </code></pre>
  1076. <p>For comparison, here is the same paragraph written using
  1077. Markdown's inline link style:</p>
  1078. <pre><code>I get 10 times more traffic from [Google](http://google.com/ "Google")
  1079. than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
  1080. [MSN](http://search.msn.com/ "MSN Search").
  1081. </code></pre>
  1082. <p>The point of reference-style links is not that they're easier to
  1083. write. The point is that with reference-style links, your document
  1084. source is vastly more readable. Compare the above examples: using
  1085. reference-style links, the paragraph itself is only 81 characters
  1086. long; with inline-style links, it's 176 characters; and as raw HTML,
  1087. it's 234 characters. In the raw HTML, there's more markup than there
  1088. is text.</p>
  1089. <p>With Markdown's reference-style links, a source document much more
  1090. closely resembles the final output, as rendered in a browser. By
  1091. allowing you to move the markup-related metadata out of the paragraph,
  1092. you can add links without interrupting the narrative flow of your
  1093. prose.</p>
  1094. <h3 id="user-content-em"><a id="user-content-emphasis-1" class="anchor" href="#emphasis-1" aria-hidden="true"><span class="octicon octicon-link"></span></a>Emphasis</h3>
  1095. <p>Markdown treats asterisks (<code>*</code>) and underscores (<code>_</code>) as indicators of
  1096. emphasis. Text wrapped with one <code>*</code> or <code>_</code> will be wrapped with an
  1097. HTML <code>&lt;em&gt;</code> tag; double <code>*</code>'s or <code>_</code>'s will be wrapped with an HTML
  1098. <code>&lt;strong&gt;</code> tag. E.g., this input:</p>
  1099. <pre><code>*single asterisks*
  1100. _single underscores_
  1101. **double asterisks**
  1102. __double underscores__
  1103. </code></pre>
  1104. <p>will produce:</p>
  1105. <pre><code>&lt;em&gt;single asterisks&lt;/em&gt;
  1106. &lt;em&gt;single underscores&lt;/em&gt;
  1107. &lt;strong&gt;double asterisks&lt;/strong&gt;
  1108. &lt;strong&gt;double underscores&lt;/strong&gt;
  1109. </code></pre>
  1110. <p>You can use whichever style you prefer; the lone restriction is that
  1111. the same character must be used to open and close an emphasis span.</p>
  1112. <p>Emphasis can be used in the middle of a word:</p>
  1113. <pre><code>un*fucking*believable
  1114. </code></pre>
  1115. <p>But if you surround an <code>*</code> or <code>_</code> with spaces, it'll be treated as a
  1116. literal asterisk or underscore.</p>
  1117. <p>To produce a literal asterisk or underscore at a position where it
  1118. would otherwise be used as an emphasis delimiter, you can backslash
  1119. escape it:</p>
  1120. <pre><code>\*this text is surrounded by literal asterisks\*
  1121. </code></pre>
  1122. <h3 id="user-content-code"><a id="user-content-code" class="anchor" href="#code" aria-hidden="true"><span class="octicon octicon-link"></span></a>Code</h3>
  1123. <p>To indicate a span of code, wrap it with backtick quotes (<code>`</code>).
  1124. Unlike a pre-formatted code block, a code span indicates code within a
  1125. normal paragraph. For example:</p>
  1126. <pre><code>Use the `printf()` function.
  1127. </code></pre>
  1128. <p>will produce:</p>
  1129. <pre><code>&lt;p&gt;Use the &lt;code&gt;printf()&lt;/code&gt; function.&lt;/p&gt;
  1130. </code></pre>
  1131. <p>To include a literal backtick character within a code span, you can use
  1132. multiple backticks as the opening and closing delimiters:</p>
  1133. <pre><code>``There is a literal backtick (`) here.``
  1134. </code></pre>
  1135. <p>which will produce this:</p>
  1136. <pre><code>&lt;p&gt;&lt;code&gt;There is a literal backtick (`) here.&lt;/code&gt;&lt;/p&gt;
  1137. </code></pre>
  1138. <p>The backtick delimiters surrounding a code span may include spaces --
  1139. one after the opening, one before the closing. This allows you to place
  1140. literal backtick characters at the beginning or end of a code span:</p>
  1141. <pre><code>A single backtick in a code span: `` ` ``
  1142. A backtick-delimited string in a code span: `` `foo` ``
  1143. </code></pre>
  1144. <p>will produce:</p>
  1145. <pre><code>&lt;p&gt;A single backtick in a code span: &lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
  1146. &lt;p&gt;A backtick-delimited string in a code span: &lt;code&gt;`foo`&lt;/code&gt;&lt;/p&gt;
  1147. </code></pre>
  1148. <p>With a code span, ampersands and angle brackets are encoded as HTML
  1149. entities automatically, which makes it easy to include example HTML
  1150. tags. Markdown will turn this:</p>
  1151. <pre><code>Please don't use any `&lt;blink&gt;` tags.
  1152. </code></pre>
  1153. <p>into:</p>
  1154. <pre><code>&lt;p&gt;Please don't use any &lt;code&gt;&amp;lt;blink&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;
  1155. </code></pre>
  1156. <p>You can write this:</p>
  1157. <pre><code>`&amp;#8212;` is the decimal-encoded equivalent of `&amp;mdash;`.
  1158. </code></pre>
  1159. <p>to produce:</p>
  1160. <pre><code>&lt;p&gt;&lt;code&gt;&amp;amp;#8212;&lt;/code&gt; is the decimal-encoded
  1161. equivalent of &lt;code&gt;&amp;amp;mdash;&lt;/code&gt;.&lt;/p&gt;
  1162. </code></pre>
  1163. <h3 id="user-content-img"><a id="user-content-images-1" class="anchor" href="#images-1" aria-hidden="true"><span class="octicon octicon-link"></span></a>Images</h3>
  1164. <p>Admittedly, it's fairly difficult to devise a "natural" syntax for
  1165. placing images into a plain text document format.</p>
  1166. <p>Markdown uses an image syntax that is intended to resemble the syntax
  1167. for links, allowing for two styles: <em>inline</em> and <em>reference</em>.</p>
  1168. <p>Inline image syntax looks like this:</p>
  1169. <pre><code>![Alt text](/path/to/img.jpg)
  1170. ![Alt text](/path/to/img.jpg "Optional title")
  1171. </code></pre>
  1172. <p>That is:</p>
  1173. <ul>
  1174. <li> An exclamation mark: <code>!</code>;</li>
  1175. <li> followed by a set of square brackets, containing the <code>alt</code>
  1176. attribute text for the image;</li>
  1177. <li> followed by a set of parentheses, containing the URL or path to
  1178. the image, and an optional <code>title</code> attribute enclosed in double
  1179. or single quotes.</li>
  1180. </ul>
  1181. <p>Reference-style image syntax looks like this:</p>
  1182. <pre><code>![Alt text][id]
  1183. </code></pre>
  1184. <p>Where "id" is the name of a defined image reference. Image references
  1185. are defined using syntax identical to link references:</p>
  1186. <pre><code>[id]: url/to/image "Optional title attribute"
  1187. </code></pre>
  1188. <p>As of this writing, Markdown has no syntax for specifying the
  1189. dimensions of an image; if this is important to you, you can simply
  1190. use regular HTML <code>&lt;img&gt;</code> tags.</p>
  1191. <hr>
  1192. <h2 id="user-content-misc"><a id="user-content-miscellaneous" class="anchor" href="#miscellaneous" aria-hidden="true"><span class="octicon octicon-link"></span></a>Miscellaneous</h2>
  1193. <h3 id="user-content-autolink"><a id="user-content-automatic-links" class="anchor" href="#automatic-links" aria-hidden="true"><span class="octicon octicon-link"></span></a>Automatic Links</h3>
  1194. <p>Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:</p>
  1195. <pre><code>&lt;http://example.com/&gt;
  1196. </code></pre>
  1197. <p>Markdown will turn this into:</p>
  1198. <pre><code>&lt;a href="http://example.com/"&gt;http://example.com/&lt;/a&gt;
  1199. </code></pre>
  1200. <p>Automatic links for email addresses work similarly, except that
  1201. Markdown will also perform a bit of randomized decimal and hex
  1202. entity-encoding to help obscure your address from address-harvesting
  1203. spambots. For example, Markdown will turn this:</p>
  1204. <pre><code>&lt;address@example.com&gt;
  1205. </code></pre>
  1206. <p>into something like this:</p>
  1207. <pre><code>&lt;a href="&amp;#x6D;&amp;#x61;i&amp;#x6C;&amp;#x74;&amp;#x6F;:&amp;#x61;&amp;#x64;&amp;#x64;&amp;#x72;&amp;#x65;
  1208. &amp;#115;&amp;#115;&amp;#64;&amp;#101;&amp;#120;&amp;#x61;&amp;#109;&amp;#x70;&amp;#x6C;e&amp;#x2E;&amp;#99;&amp;#111;
  1209. &amp;#109;"&gt;&amp;#x61;&amp;#x64;&amp;#x64;&amp;#x72;&amp;#x65;&amp;#115;&amp;#115;&amp;#64;&amp;#101;&amp;#120;&amp;#x61;
  1210. &amp;#109;&amp;#x70;&amp;#x6C;e&amp;#x2E;&amp;#99;&amp;#111;&amp;#109;&lt;/a&gt;
  1211. </code></pre>
  1212. <p>which will render in a browser as a clickable link to "<a href="mailto:address@example.com">address@example.com</a>".</p>
  1213. <p>(This sort of entity-encoding trick will indeed fool many, if not
  1214. most, address-harvesting bots, but it definitely won't fool all of
  1215. them. It's better than nothing, but an address published in this way
  1216. will probably eventually start receiving spam.)</p>
  1217. <h3 id="user-content-backslash"><a id="user-content-backslash-escapes" class="anchor" href="#backslash-escapes" aria-hidden="true"><span class="octicon octicon-link"></span></a>Backslash Escapes</h3>
  1218. <p>Markdown allows you to use backslash escapes to generate literal
  1219. characters which would otherwise have special meaning in Markdown's
  1220. formatting syntax. For example, if you wanted to surround a word with
  1221. literal asterisks (instead of an HTML <code>&lt;em&gt;</code> tag), you can backslashes
  1222. before the asterisks, like this:</p>
  1223. <pre><code>\*literal asterisks\*
  1224. </code></pre>
  1225. <p>Markdown provides backslash escapes for the following characters:</p>
  1226. <pre><code>\ backslash
  1227. ` backtick
  1228. * asterisk
  1229. _ underscore
  1230. {} curly braces
  1231. [] square brackets
  1232. () parentheses
  1233. # hash mark
  1234. + plus sign
  1235. - minus sign (hyphen)
  1236. . dot
  1237. ! exclamation mark
  1238. </code></pre>
  1239. <p>Foo [bar][].</p>
  1240. <p>Foo <a href="/tylerlong/github-markdown-css-demo/blob/master/url" title="Title with &quot;quotes&quot; inside">bar</a>.</p>
  1241. <p>[bar]: /url/ "Title with "quotes" inside"</p>
  1242. <p>This is the [simple case].</p>
  1243. <p>[simple case]: /simple</p>
  1244. <p>This one has a [line
  1245. break].</p>
  1246. <p>This one has a [line
  1247. break] with a line-ending space.</p>
  1248. <p>[line break]: /foo</p>
  1249. <p>[this] [that] and the [other]</p>
  1250. <p>[this]: /this
  1251. [that]: /that
  1252. [other]: /other</p>
  1253. <p>Here's a simple block:</p>
  1254. <div>
  1255. foo
  1256. </div>
  1257. <p>This should be a code block, though:</p>
  1258. <pre><code>&lt;div&gt;
  1259. foo
  1260. &lt;/div&gt;
  1261. </code></pre>
  1262. <p>As should this:</p>
  1263. <pre><code>&lt;div&gt;foo&lt;/div&gt;
  1264. </code></pre>
  1265. <p>Now, nested:</p>
  1266. <div>
  1267. <div>
  1268. <div>
  1269. foo
  1270. </div>
  1271. </div>
  1272. </div>
  1273. <p>This should just be an HTML comment:</p>
  1274. <p>Multiline:</p>
  1275. <p>Code block:</p>
  1276. <pre><code>&lt;!-- Comment --&gt;
  1277. </code></pre>
  1278. <p>Just plain comment, with trailing spaces on the line:</p>
  1279. <p>Code:</p>
  1280. <pre><code>&lt;hr /&gt;
  1281. </code></pre>
  1282. <p>Hr's:</p>
  1283. <hr>
  1284. <hr>
  1285. <hr>
  1286. <hr>
  1287. <hr>
  1288. <hr>
  1289. <hr id="user-content-bar">
  1290. <hr id="user-content-bar">
  1291. <hr id="user-content-bar">
  1292. <div class="highlight highlight-js"><pre><span class="pl-k">var</span> gulp <span class="pl-k">=</span> <span class="pl-c1">require</span>(<span class="pl-s"><span class="pl-pds">'</span>gulp<span class="pl-pds">'</span></span>);
  1293. <span class="pl-k">var</span> myth <span class="pl-k">=</span> <span class="pl-c1">require</span>(<span class="pl-s"><span class="pl-pds">'</span>gulp-myth<span class="pl-pds">'</span></span>);
  1294. gulp.task(<span class="pl-s"><span class="pl-pds">'</span>default<span class="pl-pds">'</span></span>, <span class="pl-k">function</span> () {
  1295. <span class="pl-k">return</span> gulp.<span class="pl-c1">src</span>(<span class="pl-s"><span class="pl-pds">'</span>src/app.css<span class="pl-pds">'</span></span>)
  1296. .pipe(myth())
  1297. .pipe(gulp.dest(<span class="pl-s"><span class="pl-pds">'</span>dist<span class="pl-pds">'</span></span>));
  1298. });</pre></div>
  1299. </article>
  1300. <a href="https://github.com/sindresorhus/github-markdown-css"><img style="position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px;" src="http://aral.github.com/fork-me-on-github-retina-ribbons/right-graphite@2x.png" alt="Fork me on GitHub"></a>
  1301. </body>
  1302. </html>