forked from sindresorhus/github-markdown-css
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1854 lines (1302 loc) · 59.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
<title>GitHub Markdown CSS demo</title>
<link rel="stylesheet" href="github-markdown.css">
<style>
body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
}
</style>
</head>
<body>
<article class="markdown-body">
<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>
<p><a name="user-content-headers"></a></p><a name="user-content-headers">
</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>
<pre lang="no-highlight"><code># H1
## H2
### H3
#### H4
##### H5
###### H6
Alternatively, for H1 and H2, an underline-ish style:
Alt-H1
======
Alt-H2
------
</code></pre>
<h1><a id="user-content-h1" class="anchor" href="#h1" aria-hidden="true"><span class="octicon octicon-link"></span></a>H1</h1>
<h2><a id="user-content-h2" class="anchor" href="#h2" aria-hidden="true"><span class="octicon octicon-link"></span></a>H2</h2>
<h3><a id="user-content-h3" class="anchor" href="#h3" aria-hidden="true"><span class="octicon octicon-link"></span></a>H3</h3>
<h4><a id="user-content-h4" class="anchor" href="#h4" aria-hidden="true"><span class="octicon octicon-link"></span></a>H4</h4>
<h5><a id="user-content-h5" class="anchor" href="#h5" aria-hidden="true"><span class="octicon octicon-link"></span></a>H5</h5>
<h6><a id="user-content-h6" class="anchor" href="#h6" aria-hidden="true"><span class="octicon octicon-link"></span></a>H6</h6>
<p>Alternatively, for H1 and H2, an underline-ish style:</p>
<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>
<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>
<p><a name="user-content-headers"></a><a name="user-content-emphasis"></a></p><a name="user-content-emphasis">
</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>
<pre lang="no-highlight"><code>Emphasis, aka italics, with *asterisks* or _underscores_.
Strong emphasis, aka bold, with **asterisks** or __underscores__.
Combined emphasis with **asterisks and _underscores_**.
Strikethrough uses two tildes. ~~Scratch this.~~
</code></pre>
<p>Emphasis, aka italics, with <em>asterisks</em> or <em>underscores</em>.</p>
<p>Strong emphasis, aka bold, with <strong>asterisks</strong> or <strong>underscores</strong>.</p>
<p>Combined emphasis with <strong>asterisks and <em>underscores</em></strong>.</p>
<p>Strikethrough uses two tildes. <del>Scratch this.</del></p>
<p><a name="user-content-emphasis"></a><a name="user-content-lists"></a></p><a name="user-content-lists">
</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>
<p>(In this example, leading and trailing spaces are shown with with dots: ⋅)</p>
<pre lang="no-highlight"><code>1. First ordered list item
2. Another item
⋅⋅* Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
⋅⋅1. Ordered sub-list
4. And another item.
⋅⋅⋅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).
⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅
⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅
⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)
* Unordered list can use asterisks
- Or minuses
+ Or pluses
</code></pre>
<ol>
<li>First ordered list item</li>
<li>Another item
<ul>
<li>Unordered sub-list.</li>
</ul></li>
<li>Actual numbers don't matter, just that it's a number
<ol>
<li>Ordered sub-list</li>
</ol></li>
<li><p>And another item.</p>
<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>
<p>To have a line break without a paragraph, you will need to use two trailing spaces.
Note that this line is separate, but within the same paragraph.
(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)</p></li>
</ol>
<ul>
<li>Unordered list can use asterisks</li>
<li>Or minuses</li>
<li><p>Or pluses</p></li>
</ul>
<ol>
<li>foo
<ol>
<li>bar
<ol>
<li>baz
<ol>
<li>faz</li>
</ol></li>
</ol></li>
</ol></li>
<li><p>foo2</p></li>
</ol>
<ul>
<li>foo
<ul>
<li>bar
<ul>
<li>baz
<ul>
<li>faz</li>
</ul></li>
</ul></li>
</ul></li>
<li><p>foo2</p></li>
</ul>
<ol>
<li><p>foo</p>
<ul>
<li>bar
<ol>
<li>baz
<ul>
<li>faz</li>
</ul></li>
</ol></li>
</ul></li>
</ol>
<ul>
<li><p>foo</p>
<ol>
<li>bar
<ul>
<li>baz
<ol>
<li>faz</li>
</ol></li>
</ul></li>
</ol></li>
</ul>
<ol>
<li>Lists in a list item:
<ul>
<li>Indented four spaces.
<ul>
<li>indented eight spaces.</li>
</ul></li>
<li>Four spaces again.</li>
</ul></li>
<li><p>Multiple paragraphs in a list items:
It's best to indent the paragraphs four spaces
You can get away with three, but it can get
confusing when you nest other things.
Stick to four.</p>
<p>We indented the first line an extra space to align
it with these paragraphs. In real use, we might do
that to the entire list so that all items line up.</p>
<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>
<li><p>Blockquotes in a list item:</p>
<blockquote>
<p>Skip a line and
indent the >'s four spaces.</p>
</blockquote></li>
<li><p>Preformatted text in a list item:</p>
<pre><code>Skip a line and indent eight spaces.
That's four spaces for the list
and four to trigger the code block.
</code></pre></li>
</ol>
<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>
<p>To reboot your computer, press <kbd>ctrl</kbd>+<kbd>alt</kbd>+<kbd>del</kbd>.</p>
<p><a name="user-content-lists"></a><a name="user-content-links"></a></p><a name="user-content-links">
</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>
<p>There are two ways to create links.</p>
<pre lang="no-highlight"><code>[I'm an inline-style link](https://www.google.com)
[I'm an inline-style link with title](https://www.google.com "Google's Homepage")
[I'm a reference-style link][Arbitrary case-insensitive reference text]
[I'm a relative reference to a repository file](../blob/master/LICENSE)
[You can use numbers for reference-style link definitions][1]
Or leave it empty and use the [link text itself]
Some text to show that the reference links can follow later.
[arbitrary case-insensitive reference text]: https://www.mozilla.org
[1]: http://slashdot.org
[link text itself]: http://www.reddit.com
</code></pre>
<p><a name="user-content-links"></a><a href="https://www.google.com">I'm an inline-style link</a></p>
<p><a href="https://www.google.com" title="Google's Homepage">I'm an inline-style link with title</a></p>
<p><a href="https://www.mozilla.org">I'm a reference-style link</a></p>
<p><a href="/tylerlong/github-markdown-css-demo/blob/blob/master/LICENSE">I'm a relative reference to a repository file</a></p>
<p><a href="http://slashdot.org">You can use numbers for reference-style link definitions</a></p>
<p>Or leave it empty and use the <a href="http://www.reddit.com">link text itself</a></p>
<p>Some text to show that the reference links can follow later.</p>
<p><a name="user-content-images"></a></p><a name="user-content-images">
</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>
<pre lang="no-highlight"><code>Here's our logo (hover to see the title text):
Inline-style:
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")
Reference-style:
![alt text][logo]
[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
</code></pre>
<p>Here's our logo (hover to see the title text):</p>
<p>Inline-style:
<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>
<p>Reference-style:
<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>
<p><a name="user-content-images"></a><a name="user-content-code"></a></p><a name="user-content-code">
</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>
<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>
<pre lang="no-highlight"><code>Inline `code` has `back-ticks around` it.
</code></pre>
<p>Inline <code>code</code> has <code>back-ticks around</code> it.</p>
<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>
<pre lang="no-highlight"><code>```javascript
var s = "JavaScript syntax highlighting";
alert(s);
```
```python
s = "Python syntax highlighting"
print s
```
```
No language indicated, so no syntax highlighting.
But let's throw in a <b>tag</b>.
```
</code></pre>
<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>;
<span class="pl-c1">alert</span>(s);</pre></div>
<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>
<span class="pl-k">print</span> s</pre></div>
<pre><code>No language indicated, so no syntax highlighting in Markdown Here (varies on Github).
But let's throw in a <b>tag</b>.
</code></pre>
<p><a name="user-content-tables"></a></p><a name="user-content-tables">
</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>
<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>
<pre lang="no-highlight"><code>Colons can be used to align columns.
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | |
| col 2 is | centered | |
| zebra stripes | are neat | |
The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.
Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3
</code></pre>
<p>Colons can be used to align columns.</p>
<table><thead>
<tr>
<th>Tables</th>
<th align="center">Are</th>
<th align="right">Cool</th>
</tr>
</thead><tbody>
<tr>
<td>col 3 is</td>
<td align="center">right-aligned</td>
<td align="right"></td>
</tr>
<tr>
<td>col 2 is</td>
<td align="center">centered</td>
<td align="right"></td>
</tr>
<tr>
<td>zebra stripes</td>
<td align="center">are neat</td>
<td align="right"></td>
</tr>
</tbody></table>
<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>
<table><thead>
<tr>
<th>Markdown</th>
<th>Less</th>
<th>Pretty</th>
</tr>
</thead><tbody>
<tr>
<td><em>Still</em></td>
<td><code>renders</code></td>
<td><strong>nicely</strong></td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</tbody></table>
<p><a name="user-content-tables"></a><a name="user-content-blockquotes"></a></p><a name="user-content-blockquotes">
</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>
<pre lang="no-highlight"><code>> Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote.
Quote break.
> 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.
</code></pre>
<blockquote>
<p>Blockquotes are very handy in email to emulate reply text.
This line is part of the same quote.</p>
</blockquote>
<p>Quote break.</p>
<blockquote>
<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>
</blockquote>
<p><a name="user-content-blockquotes"></a><a name="user-content-html"></a></p><a name="user-content-html">
</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>
<p>You can also use raw HTML in your Markdown, and it'll mostly work pretty well.</p>
<pre lang="no-highlight"><code><dl>
<dt>Definition list</dt>
<dd>Is something people use sometimes.</dd>
<dt>Markdown in HTML</dt>
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
</dl>
</code></pre>
<dl>
<dt>Definition list</dt>
<dd>Is something people use sometimes.</dd>
<dt>Markdown in HTML</dt>
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
</dl>
<p><a name="user-content-html"></a><a name="user-content-hr"></a></p><a name="user-content-hr">
</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>
<pre><code>Three or more...
---
Hyphens
***
Asterisks
___
Underscores
</code></pre>
<p>Three or more...</p>
<hr>
<p>Hyphens</p>
<hr>
<p>Asterisks</p>
<hr>
<p>Underscores</p>
<p><a name="user-content-hr"></a><a name="user-content-lines"></a></p><a name="user-content-lines">
</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>
<p>My basic recommendation for learning how line breaks work is to experiment and discover -- hit <Enter> 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>
<p>Here are some things to try out:</p>
<pre><code>Here's a line for us to start with.
This line is separated from the one above by two newlines, so it will be a *separate paragraph*.
This line is also a separate paragraph, but...
This line is only separated by a single newline, so it's a separate line in the *same paragraph*.
</code></pre>
<p>Here's a line for us to start with.</p>
<p>This line is separated from the one above by two newlines, so it will be a <em>separate paragraph</em>.</p>
<p>This line is also begins a separate paragraph, but...
This line is only separated by a single newline, so it's a separate line in the <em>same paragraph</em>.</p>
<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>
<p><a name="user-content-lines"></a><a name="user-content-videos"></a></p><a name="user-content-videos">
</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>
<p>They can't be added directly but you can add an image with a link to the video like this:</p>
<pre lang="no-highlight"><code><a href="http://www.youtube.com/watch?feature=player_embedded&v=YOUTUBE_VIDEO_ID_HERE
" target="_blank"><img src="http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg"
alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /></a>
</code></pre>
<p>Or, in pure Markdown, but losing the image sizing and border:</p>
<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)
</code></pre>
<p>Referencing a bug by #bugID in your git commit links it to the slip. For example #1.</p>
<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>
<ul class="task-list">
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled"> foo
<ul class="task-list">
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled"> foo</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" checked="checked" disabled="disabled"> foo</li>
</ul></li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" checked="checked" disabled="disabled"> foo</li>
</ul>
<p><a name="user-content-videos">[test]: </a><a href="http://google.com/">http://google.com/</a> "Google"</p>
<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>
<p>Just a note, I've found that I can't test my markdown parser vs others.
For example, both markdown.js and showdown code blocks in lists wrong. They're
also completely [inconsistent][test] with regards to paragraphs in list items.</p>
<p>A link. Not anymore.</p>
<p></p>This will make me fail the test because
markdown.js doesnt acknowledge arbitrary html blocks =/<p></p>
<ul>
<li><p>List Item 1</p></li>
<li><p>List Item 2</p>
<ul>
<li>New List Item 1
Hi, this is a list item.</li>
<li>New List Item 2
Another item
Code goes here.
Lots of it...</li>
<li>New List Item 3
The last item</li>
</ul></li>
<li><p>List Item 3
The final item.</p></li>
<li><p>List Item 4
The real final item.</p></li>
</ul>
<p>Paragraph.</p>
<blockquote>
<ul>
<li>bq Item 1</li>
<li>bq Item 2
<ul>
<li>New bq Item 1</li>
<li>New bq Item 2
Text here</li>
</ul></li>
</ul>
</blockquote>
<hr>
<blockquote>
<p>Another blockquote!
I really need to get
more creative with
mockup text..
markdown.js breaks here again</p>
</blockquote>
<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>
<p>Hello <em>world</em>. Here is a <a href="//hello">link</a>.
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>
<pre><code>Code goes here.
Lots of it...
</code></pre>
<blockquote>
<p>A list within a blockquote:</p>
<ul>
<li>asterisk 1</li>
<li>asterisk 2</li>
<li>asterisk 3</li>
</ul>
</blockquote>
<p><strong><em>This is strong and em.</em></strong></p>
<p>So is <strong><em>this</em></strong> word.</p>
<p><strong><em>This is strong and em.</em></strong></p>
<p>So is <strong><em>this</em></strong> word.</p>
<h2><a id="user-content-unordered" class="anchor" href="#unordered" aria-hidden="true"><span class="octicon octicon-link"></span></a>Unordered</h2>
<p>Asterisks tight:</p>
<ul>
<li> asterisk 1</li>
<li> asterisk 2</li>
<li> asterisk 3</li>
</ul>
<p>Asterisks loose:</p>
<ul>
<li><p>asterisk 1</p></li>
<li><p>asterisk 2</p></li>
<li><p>asterisk 3</p></li>
</ul>
<hr>
<p>Pluses tight:</p>
<ul>
<li> Plus 1</li>
<li> Plus 2</li>
<li> Plus 3</li>
</ul>
<p>Pluses loose:</p>
<ul>
<li><p>Plus 1</p></li>
<li><p>Plus 2</p></li>
<li><p>Plus 3</p></li>
</ul>
<hr>
<p>Minuses tight:</p>
<ul>
<li> Minus 1</li>
<li> Minus 2</li>
<li> Minus 3</li>
</ul>
<p>Minuses loose:</p>
<ul>
<li><p>Minus 1</p></li>
<li><p>Minus 2</p></li>
<li><p>Minus 3</p></li>
</ul>
<h2><a id="user-content-ordered" class="anchor" href="#ordered" aria-hidden="true"><span class="octicon octicon-link"></span></a>Ordered</h2>
<p>Tight:</p>
<ol>
<li> First</li>
<li> Second</li>
<li> Third</li>
</ol>
<p>and:</p>
<ol>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ol>
<p>Loose using tabs:</p>
<ol>
<li><p>First</p></li>
<li><p>Second</p></li>
<li><p>Third</p></li>
</ol>
<p>and using spaces:</p>
<ol>
<li><p>One</p></li>
<li><p>Two</p></li>
<li><p>Three</p></li>
</ol>
<p>Multiple paragraphs:</p>
<ol>
<li><p>Item 1, graf one.</p>
<p>Item 2. graf two. The quick brown fox jumped over the lazy dog's
back.</p></li>
<li><p>Item 2.</p></li>
<li><p>Item 3.</p></li>
</ol>
<h2><a id="user-content-nested" class="anchor" href="#nested" aria-hidden="true"><span class="octicon octicon-link"></span></a>Nested</h2>
<ul>
<li> Tab
<ul>
<li> Tab
<ul>
<li> Tab</li>
</ul></li>
</ul></li>
</ul>
<p>Here's another:</p>
<ol>
<li>First</li>
<li>Second:
<ul>
<li>Fee</li>
<li>Fie</li>
<li>Foe</li>
</ul></li>
<li>Third</li>
</ol>
<p>Same thing but with paragraphs:</p>
<ol>
<li><p>First</p></li>
<li><p>Second:</p>
<ul>
<li>Fee</li>
<li>Fie</li>
<li>Foe</li>
</ul></li>
<li><p>Third</p></li>
</ol>
<p>This was an error in Markdown 1.0.1:</p>
<ul>
<li><p>this</p>
<ul>
<li> sub</li>
</ul>
<p>that</p></li>
</ul>
<blockquote>
<p>foo</p>
<blockquote>
<p>bar</p>
</blockquote>
<p>foo</p>
</blockquote>
<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>
<ul id="user-content-ProjectSubmenu">
<li><a href="/tylerlong/github-markdown-css-demo/blob/master/projects/markdown" title="Markdown Project Page">Main</a></li>
<li><a href="/tylerlong/github-markdown-css-demo/blob/master/projects/markdown/basics" title="Markdown Basics">Basics</a></li>
<li>Syntax</li>
<li><a href="/tylerlong/github-markdown-css-demo/blob/master/projects/markdown/license" title="Pricing and License Information">License</a></li>
<li><a href="/tylerlong/github-markdown-css-demo/blob/master/projects/markdown/dingus" title="Online Markdown Web Form">Dingus</a></li>
</ul>
<ul>
<li> <a href="#overview">Overview</a>
<ul>
<li> <a href="#philosophy">Philosophy</a></li>
<li> <a href="#html">Inline HTML</a></li>
<li> <a href="#autoescape">Automatic Escaping for Special Characters</a></li>
</ul></li>
<li> <a href="#block">Block Elements</a>
<ul>
<li> <a href="#p">Paragraphs and Line Breaks</a></li>
<li> <a href="#header">Headers</a></li>
<li> <a href="#blockquote">Blockquotes</a></li>
<li> <a href="#list">Lists</a></li>
<li> <a href="#precode">Code Blocks</a></li>
<li> <a href="#hr">Horizontal Rules</a></li>
</ul></li>
<li> <a href="#span">Span Elements</a>
<ul>
<li> <a href="#link">Links</a></li>
<li> <a href="#em">Emphasis</a></li>
<li> <a href="#code">Code</a></li>
<li> <a href="#img">Images</a></li>
</ul></li>
<li> <a href="#misc">Miscellaneous</a>
<ul>
<li> <a href="#backslash">Backslash Escapes</a></li>
<li> <a href="#autolink">Automatic Links</a></li>
</ul></li>
</ul>
<p><strong>Note:</strong> This document is itself written using Markdown; you
can [see the source for it by adding '.text' to the URL][src].</p>
<p>[src]: /projects/markdown/syntax.text</p>
<hr>
<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>
<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>
<p>Markdown is intended to be as easy-to-read and easy-to-write as is feasible.</p>
<p>Readability, however, is emphasized above all else. A Markdown-formatted
document should be publishable as-is, as plain text, without looking
like it's been marked up with tags or formatting instructions. While
Markdown's syntax has been influenced by several existing text-to-HTML
filters -- including <a href="http://slashdot.org">Setext</a>, [atx] [2], [Textile] [3], [reStructuredText] [4],
[Grutatext] [5], and [EtText] [6] -- the single biggest source of
inspiration for Markdown's syntax is the format of plain text email.</p>
<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>
[2]: <a href="http://www.aaronsw.com/2002/atx/">http://www.aaronsw.com/2002/atx/</a>
[3]: <a href="http://textism.com/tools/textile/">http://textism.com/tools/textile/</a>
[4]: <a href="http://docutils.sourceforge.net/rst.html">http://docutils.sourceforge.net/rst.html</a>
[5]: <a href="http://www.triptico.com/software/grutatxt.html">http://www.triptico.com/software/grutatxt.html</a>
[6]: <a href="http://ettext.taint.org/doc/">http://ettext.taint.org/doc/</a></p>
<p>To this end, Markdown's syntax is comprised entirely of punctuation
characters, which punctuation characters have been carefully chosen so
as to look like what they mean. E.g., asterisks around a word actually
look like *emphasis*. Markdown lists look like, well, lists. Even
blockquotes look like quoted passages of text, assuming you've ever
used email.</p>
<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>
<p>Markdown's syntax is intended for one purpose: to be used as a
format for <em>writing</em> for the web.</p>
<p>Markdown is not a replacement for HTML, or even close to it. Its
syntax is very small, corresponding only to a very small subset of
HTML tags. The idea is <em>not</em> to create a syntax that makes it easier
to insert HTML tags. In my opinion, HTML tags are already easy to
insert. The idea for Markdown is to make it easy to read, write, and
edit prose. HTML is a <em>publishing</em> format; Markdown is a <em>writing</em>
format. Thus, Markdown's formatting syntax only addresses issues that
can be conveyed in plain text.</p>
<p>For any markup that is not covered by Markdown's syntax, you simply
use HTML itself. There's no need to preface it or delimit it to
indicate that you're switching from Markdown to HTML; you just use
the tags.</p>
<p>The only restrictions are that block-level HTML elements -- e.g. <code><div></code>,
<code><table></code>, <code><pre></code>, <code><p></code>, etc. -- must be separated from surrounding
content by blank lines, and the start and end tags of the block should
not be indented with tabs or spaces. Markdown is smart enough not
to add extra (unwanted) <code><p></code> tags around HTML block-level tags.</p>
<p>For example, to add an HTML table to a Markdown article:</p>
<pre><code>This is a regular paragraph.
<table>
<tr>
<td>Foo</td>
</tr>
</table>
This is another regular paragraph.
</code></pre>
<p>Note that Markdown formatting syntax is not processed within block-level
HTML tags. E.g., you can't use Markdown-style <code>*emphasis*</code> inside an
HTML block.</p>
<p>Span-level HTML tags -- e.g. <code><span></code>, <code><cite></code>, or <code><del></code> -- 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 <code><a></code> or <code><img></code> tags instead of Markdown's
link or image syntax, go right ahead.</p>
<p>Unlike block-level HTML tags, Markdown syntax <em>is</em> processed within
span-level tags.</p>
<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>
<p>In HTML, there are two characters that demand special treatment: <code><</code>
and <code>&</code>. Left angle brackets are used to start tags; ampersands are
used to denote HTML entities. If you want to use them as literal
characters, you must escape them as entities, e.g. <code>&lt;</code>, and
<code>&amp;</code>.</p>
<p>Ampersands in particular are bedeviling for web writers. If you want to
write about 'AT&T', you need to write '<code>AT&amp;T</code>'. You even need to
escape ampersands within URLs. Thus, if you want to link to:</p>
<pre><code>http://images.google.com/images?num=30&q=larry+bird
</code></pre>
<p>you need to encode the URL as:</p>
<pre><code>http://images.google.com/images?num=30&amp;q=larry+bird
</code></pre>
<p>in your anchor tag <code>href</code> attribute. Needless to say, this is easy to
forget, and is probably the single most common source of HTML validation
errors in otherwise well-marked-up web sites.</p>
<p>Markdown allows you to use these characters naturally, taking care of
all the necessary escaping for you. If you use an ampersand as part of
an HTML entity, it remains unchanged; otherwise it will be translated
into <code>&amp;</code>.</p>
<p>So, if you want to include a copyright symbol in your article, you can write:</p>
<pre><code>&copy;
</code></pre>
<p>and Markdown will leave it alone. But if you write:</p>
<pre><code>AT&T
</code></pre>
<p>Markdown will translate it to:</p>
<pre><code>AT&amp;T
</code></pre>
<p>Similarly, because Markdown supports <a href="#html">inline HTML</a>, if you use
angle brackets as delimiters for HTML tags, Markdown will treat them as
such. But if you write:</p>
<pre><code>4 < 5
</code></pre>
<p>Markdown will translate it to:</p>
<pre><code>4 &lt; 5
</code></pre>
<p>However, inside Markdown code spans and blocks, angle brackets and
ampersands are <em>always</em> encoded automatically. This makes it easy to use
Markdown to write about HTML code. (As opposed to raw HTML, which is a
terrible format for writing about HTML syntax, because every single <code><</code>
and <code>&</code> in your example code needs to be escaped.)</p>
<hr>
<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>
<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>
<p>A paragraph is simply one or more consecutive lines of text, separated
by one or more blank lines. (A blank line is any line that looks like a
blank line -- a line containing nothing but spaces or tabs is considered
blank.) Normal paragraphs should not be intended with spaces or tabs.</p>
<p>The implication of the "one or more consecutive lines of text" rule is
that Markdown supports "hard-wrapped" text paragraphs. This differs
significantly from most other text-to-HTML formatters (including Movable
Type's "Convert Line Breaks" option) which translate every line break
character in a paragraph into a <code><br /></code> tag.</p>
<p>When you <em>do</em> want to insert a <code><br /></code> break tag using Markdown, you
end a line with two or more spaces, then type return.</p>