Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 433d2883567248d8eb478ca896d3a58125f5e0e4 (plain) (blame)
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
<!--  generated by featurizer  -->
<p>&rsquo;&rsquo;&rsquo;&rsquo;&rsquo;&rsquo;</p>
<p>&rsquo;&rsquo;&rsquo;<br/> Taken from <a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet">https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet</a></p>
<pre><code>    ---

    This is intended as a quick reference and showcase. For more complete info, see [John Gruber&#39;s original spec](http://daringfireball.net/projects/markdown/) and the [Github-flavored Markdown info page](http://github.github.com/github-flavored-markdown/).

    Note that there is also a [Cheatsheet specific to Markdown Here](./Markdown-Here-Cheatsheet) if that&#39;s what you&#39;re looking for. You can also check out [more Markdown tools](./Other-Markdown-Tools).

    ##### Table of Contents  
    [Headers](#headers)  
    [Emphasis](#emphasis)  
    [Lists](#lists)  
    [Links](#links)  
    [Images](#images)  
    [Code and Syntax Highlighting](#code)  
    [Tables](#tables)  
    [Blockquotes](#blockquotes)  
    [Inline HTML](#html)  
    [Horizontal Rule](#hr)  
    [Line Breaks](#lines)  
    [Youtube videos](#videos)  

    &lt;a name=&quot;headers&quot;/&gt;
    ## Headers

    ```no-highlight
    # H1
    ## H2
    ### H3
    #### H4
    ##### H5
    ###### H6

    Alternatively, for H1 and H2, an underline-ish style:

    Alt-H1
    ======

    Alt-H2
    ------
    ```

    # H1
    ## H2
    ### H3
    #### H4
    ##### H5
    ###### H6

    Alternatively, for H1 and H2, an underline-ish style:

    Alt-H1
    ======

    Alt-H2
    ------

    &lt;a name=&quot;emphasis&quot;/&gt;
    ## Emphasis

    ```no-highlight
    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.~~
    ```

    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.~~


    &lt;a name=&quot;lists&quot;/&gt;
    ## Lists

    (In this example, leading and trailing spaces are shown with with dots: ⋅)

    ```no-highlight
    1. First ordered list item
    2. Another item
      * Unordered sub-list. 
    1. Actual numbers don&#39;t matter, just that it&#39;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&#39;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
    ```

    1. First ordered list item
    2. Another item
      * Unordered sub-list. 
    1. Actual numbers don&#39;t matter, just that it&#39;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&#39;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

    &lt;a name=&quot;links&quot;/&gt;
    ## Links

    There are two ways to create links.

    ```no-highlight
    [I&#39;m an inline-style link](https://www.google.com)

    [I&#39;m an inline-style link with title](https://www.google.com &quot;Google&#39;s Homepage&quot;)

    [I&#39;m a reference-style link][Arbitrary case-insensitive reference text]

    [I&#39;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
    ```

    [I&#39;m an inline-style link](https://www.google.com)

    [I&#39;m an inline-style link with title](https://www.google.com &quot;Google&#39;s Homepage&quot;)

    [I&#39;m a reference-style link][Arbitrary case-insensitive reference text]

    [I&#39;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

    &lt;a name=&quot;images&quot;/&gt;
    ## Images

    ```no-highlight
    Here&#39;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 &quot;Logo Title Text 1&quot;)

    Reference-style: 
    ![alt text][logo]

    [logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png &quot;Logo Title Text 2&quot;
    ```

    Here&#39;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 &quot;Logo Title Text 1&quot;)

    Reference-style: 
    ![alt text][logo]

    [logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png &quot;Logo Title Text 2&quot;

    &lt;a name=&quot;code&quot;/&gt;
    ## Code and Syntax Highlighting

    Code blocks are part of the Markdown spec, but syntax highlighting isn&#39;t. However, many renderers -- like Github&#39;s and *Markdown Here* -- support syntax highlighting. Which languages are supported and how those language names should be written will vary from renderer to renderer. *Markdown Here* 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 [highlight.js demo page](http://softwaremaniacs.org/media/soft/highlight/test.html).

    ```no-highlight
    Inline `code` has `back-ticks around` it.
    ```

    Inline `code` has `back-ticks around` it.

    Blocks of code are either fenced by lines with three back-ticks &lt;code&gt;```&lt;/code&gt;, or are indented with four spaces. I recommend only using the fenced code blocks -- they&#39;re easier and only they support syntax highlighting.

    &lt;pre lang=&quot;no-highlight&quot;&gt;&lt;code&gt;```javascript
    var s = &quot;JavaScript syntax highlighting&quot;;
    alert(s);
    ```

    ```python
    s = &quot;Python syntax highlighting&quot;
    print s
    ```

    ```
    No language indicated, so no syntax highlighting. 
    But let&#39;s throw in a &amp;lt;b&amp;gt;tag&amp;lt;/b&amp;gt;.
    ```
    &lt;/code&gt;&lt;/pre&gt;



    ```javascript
    var s = &quot;JavaScript syntax highlighting&quot;;
    alert(s);
    ```

    ```python
    s = &quot;Python syntax highlighting&quot;
    print s
    ```

    ```
    No language indicated, so no syntax highlighting in Markdown Here (varies on Github). 
    But let&#39;s throw in a &lt;b&gt;tag&lt;/b&gt;.
    ```


    &lt;a name=&quot;tables&quot;/&gt;
    ## Tables

    Tables aren&#39;t part of the core Markdown spec, but they are part of GFM and *Markdown Here* supports them. They are an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application.

    ```no-highlight
    Colons can be used to align columns.

    | Tables        | Are           | Cool  |
    | ------------- |:-------------:| -----:|
    | col 3 is      | right-aligned | $1600 |
    | col 2 is      | centered      |   $12 |
    | zebra stripes | are neat      |    $1 |

    The outer pipes (|) are optional, and you don&#39;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
    ```

    Colons can be used to align columns.

    | Tables        | Are           | Cool |
    | ------------- |:-------------:| -----:|
    | col 3 is      | right-aligned | $1600 |
    | col 2 is      | centered      |   $12 |
    | zebra stripes | are neat      |    $1 |

    The outer pipes (|) are optional, and you don&#39;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

    &lt;a name=&quot;blockquotes&quot;/&gt;
    ## Blockquotes

    ```no-highlight
    &gt; Blockquotes are very handy in email to emulate reply text.
    &gt; This line is part of the same quote.

    Quote break.

    &gt; This is a very long line that will still be quoted properly when it wraps. Oh boy let&#39;s keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. 
    ```

    &gt; Blockquotes are very handy in email to emulate reply text.
    &gt; This line is part of the same quote.

    Quote break.

    &gt; This is a very long line that will still be quoted properly when it wraps. Oh boy let&#39;s keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. 

    &lt;a name=&quot;html&quot;/&gt;
    ## Inline HTML

    You can also use raw HTML in your Markdown, and it&#39;ll mostly work pretty well. 

    ```no-highlight
    &lt;dl&gt;
      &lt;dt&gt;Definition list&lt;/dt&gt;
      &lt;dd&gt;Is something people use sometimes.&lt;/dd&gt;

      &lt;dt&gt;Markdown in HTML&lt;/dt&gt;
      &lt;dd&gt;Does *not* work **very** well. Use HTML &lt;em&gt;tags&lt;/em&gt;.&lt;/dd&gt;
    &lt;/dl&gt;
    ```

    &lt;dl&gt;
      &lt;dt&gt;Definition list&lt;/dt&gt;
      &lt;dd&gt;Is something people use sometimes.&lt;/dd&gt;

      &lt;dt&gt;Markdown in HTML&lt;/dt&gt;
      &lt;dd&gt;Does *not* work **very** well. Use HTML &lt;em&gt;tags&lt;/em&gt;.&lt;/dd&gt;
    &lt;/dl&gt;

    &lt;a name=&quot;hr&quot;/&gt;
    ## Horizontal Rule

    ```
    Three or more...

    ---

    Hyphens

    ***

    Asterisks

    ___

    Underscores
    ```

    Three or more...

    ---

    Hyphens

    ***

    Asterisks

    ___

    Underscores

    &lt;a name=&quot;lines&quot;/&gt;
    ## Line Breaks

    My basic recommendation for learning how line breaks work is to experiment and discover -- hit &amp;lt;Enter&amp;gt; once (i.e., insert one newline), then hit it twice (i.e., insert two newlines), see what happens. You&#39;ll soon learn to get what you want. &quot;Markdown Toggle&quot; is your friend. 

    Here are some things to try out:

    ```
    Here&#39;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&#39;s a separate line in the *same paragraph*.
    ```

    Here&#39;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 begins a separate paragraph, but...  
    This line is only separated by a single newline, so it&#39;s a separate line in the *same paragraph*.

    (Technical note: *Markdown Here* uses GFM line breaks, so there&#39;s no need to use MD&#39;s two-space line breaks.)

    &lt;a name=&quot;videos&quot;/&gt;
    ## Youtube videos

    They can&#39;t be added directly but you can add an image with a link to the video like this:

    ```no-highlight
    &lt;a href=&quot;http://www.youtube.com/watch?feature=player_embedded&amp;v=YOUTUBE_VIDEO_ID_HERE
    &quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg&quot; 
    alt=&quot;IMAGE ALT TEXT HERE&quot; width=&quot;240&quot; height=&quot;180&quot; border=&quot;10&quot; /&gt;&lt;/a&gt;
    ```

    Or, in pure Markdown, but losing the image sizing and border:

    ```no-highlight
    [![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)
    ```

    Referencing a bug by #bugID in your git commit links it to the slip. For example #1. 
&#39;&#39;&#39;
</code></pre>

Back to the top