1MARKDOWN(7)          BSD Miscellaneous Information Manual          MARKDOWN(7)
2

NAME

4     Markdown — The Markdown text formatting syntax
5

DESCRIPTION

7   Philosophy
8     Markdown is intended to be as easy-to-read and easy-to-write as is feasi‐
9     ble.
10
11     Readability, however, is emphasized above all else. A Markdown-formatted
12     document should be publishable as-is, as plain text, without looking like
13     it's been marked up with tags or formatting instructions. While Mark‐
14     down's syntax has been influenced by several existing text-to-HTML fil‐
15     ters -- including Setext, atx, Textile, reStructuredText, Grutatext, and
16     EtText -- the single biggest source of inspiration for Markdown's syntax
17     is the format of plain text email.
18
19     To this end, Markdown's syntax is comprised entirely of punctuation char‐
20     acters, which punctuation characters have been carefully chosen so as to
21     look like what they mean. E.g., asterisks around a word actually look
22     like *emphasis*. Markdown lists look like, well, lists. Even blockquotes
23     look like quoted passages of text, assuming you've ever used email.
24
25   Inline HTML
26     Markdown's syntax is intended for one purpose: to be used as a format for
27     writing for the web.
28
29     Markdown is not a replacement for HTML, or even close to it. Its syntax
30     is very small, corresponding only to a very small subset of HTML tags.
31     The idea is not to create a syntax that makes it easier to insert HTML
32     tags. In my opinion, HTML tags are already easy to insert. The idea for
33     Markdown is to make it easy to read, write, and edit prose. HTML is a
34     publishing format; Markdown is a writing format. Thus, Markdown's format‐
35     ting syntax only addresses issues that can be conveyed in plain text.
36
37     For any markup that is not covered by Markdown's syntax, you simply use
38     HTML itself. There's no need to preface it or delimit it to indicate that
39     you're switching from Markdown to HTML; you just use the tags.
40
41     The only restrictions are that block-level HTML elements -- e.g.  <div>,
42     <table>, <pre>, <p>, etc. -- must be separated from surrounding content
43     by blank lines, and the start and end tags of the block should not be
44     indented with tabs or spaces. Markdown is smart enough not to add extra
45     (unwanted) <p> tags around HTML block-level tags.
46
47     For example, to add an HTML table to a Markdown article:
48
49               This is a regular paragraph.
50
51               <table>
52                   <tr>
53                       <td>Foo</td>
54                   </tr>
55               </table>
56
57               This is another regular paragraph.
58
59     Note that Markdown formatting syntax is not processed within block-level
60     HTML tags. E.g., you can't use Markdown-style *emphasis* inside an HTML
61     block.
62
63     Span-level HTML tags -- e.g.  <span>, <cite>, or <del> -- can be used
64     anywhere in a Markdown paragraph, list item, or header. If you want, you
65     can even use HTML tags instead of Markdown formatting; e.g. if you'd pre‐
66     fer to use HTML <a> or <img> tags instead of Markdown's link or image
67     syntax, go right ahead.
68
69     Unlike block-level HTML tags, Markdown syntax *is* processed within span-
70     level tags.
71
72   Automatic Escaping for Special Characters
73     In HTML, there are two characters that demand special treatment: `<` and
74     `&`. Left angle brackets are used to start tags; ampersands are used to
75     denote HTML entities. If you want to use them as literal characters, you
76     must escape them as entities, e.g. `&lt;`, and `&amp;`.
77
78     Ampersands in particular are bedeviling for web writers. If you want to
79     write about 'AT&T', you need to write '`AT&amp;T`'. You even need to
80     escape ampersands within URLs. Thus, if you want to link to:
81
82               http://images.google.com/images?num=30&q=larry+bird
83
84     you need to encode the URL as:
85
86               http://images.google.com/images?num=30&amp;q=larry+bird
87
88     in your anchor tag `href` attribute. Needless to say, this is easy to
89     forget, and is probably the single most common source of HTML validation
90     errors in otherwise well-marked-up web sites.
91
92     Markdown allows you to use these characters naturally, taking care of all
93     the necessary escaping for you. If you use an ampersand as part of an
94     HTML entity, it remains unchanged; otherwise it will be translated into
95     `&amp;`.
96
97     So, if you want to include a copyright symbol in your article, you can
98     write:
99
100               &copy;
101
102     and Markdown will leave it alone. But if you write:
103
104               AT&T
105
106     Markdown will translate it to:
107
108               AT&amp;T
109
110     Similarly, because Markdown supports inline HTML, if you use angle brack‐
111     ets as delimiters for HTML tags, Markdown will treat them as such. But if
112     you write:
113
114               4 < 5
115
116     Markdown will translate it to:
117
118               4 &lt; 5
119
120     However, inside Markdown code spans and blocks, angle brackets and amper‐
121     sands are *always* encoded automatically. This makes it easy to use Mark‐
122     down to write about HTML code. (As opposed to raw HTML, which is a terri‐
123     ble format for writing about HTML syntax, because every single `<` and
124     `&` in your example code needs to be escaped.)
125

Block Elements

127   Paragraphs and Line Breaks
128     A paragraph is simply one or more consecutive lines of text, separated by
129     one or more blank lines. (A blank line is any line that looks like a
130     blank line -- a line containing nothing but spaces or tabs is considered
131     blank.) Normal paragraphs should not be indented with spaces or tabs.
132
133     The implication of the "one or more consecutive lines of text" rule is
134     that Markdown supports "hard-wrapped" Dtext paragraphs. This differs sig‐
135     nificantly from most other text-to-HTML formatters (including Movable
136     Type's "Convert Line Breaks" option) which translate every line break
137     character in a paragraph into a `<br />` tag.
138
139     When you *do* want to insert a `<br />` break tag using Markdown, you end
140     a line with two or more spaces, then type return.
141
142     Yes, this takes a tad more effort to create a `<br />`, but a simplistic
143     "every line break is a `<br />`" rule wouldn't work for Markdown.  Mark‐
144     down's email-style blockquoting
145      and multi-paragraph list items work best -- and look better -- when you
146     format them with hard breaks.
147
148   Headers
149     Markdown supports two styles of headers, Setext and atx.
150
151     Setext-style headers are ‘underlined’ using equal signs (for first-level
152     headers) and dashes (for second-level headers). For example:
153
154               This is an H1
155               =============
156
157               This is an H2
158               -------------
159
160     Any number of underlining `=`'s or `-`'s will work.
161
162     Atx-style headers use 1-6 hash characters at the start of the line, cor‐
163     responding to header levels 1-6. For example:
164
165               # This is an H1
166
167               ## This is an H2
168
169               ###### This is an H6
170
171     Optionally, you may "close" atx-style headers. This is purely cosmetic --
172     you can use this if you think it looks better. The closing hashes don't
173     even need to match the number of hashes used to open the header. (The
174     number of opening hashes determines the header level.) :
175
176               # This is an H1 #
177
178               ## This is an H2 ##
179
180               ### This is an H3 ######
181
182   Blockquotes
183     Markdown uses email-style `>` characters for blockquoting. If you're
184     familiar with quoting passages of text in an email message, then you know
185     how to create a blockquote in Markdown. It looks best if you hard wrap
186     the text and put a `>` before every line:
187
188               > This is a blockquote with two paragraphs. Lorem ipsum
189               > dolor sit amet, consectetuer adipiscing elit. Aliquam
190               > hendrerit mi posuere lectus. Vestibulum enim wisi,
191               > viverra nec, fringilla in, laoreet vitae, risus.
192               >
193               > Donec sit amet nisl. Aliquam semper ipsum sit amet
194               > velit. Suspendisse id sem consectetuer libero luctus
195               > adipiscing.
196
197     Markdown allows you to be lazy and only put the `>` before the first line
198     of a hard-wrapped paragraph:
199
200               > This is a blockquote with two paragraphs. Lorem ipsum
201               dolor sit amet, consectetuer adipiscing elit. Aliquam
202               hendrerit mi posuere lectus. Vestibulum enim wisi,
203               viverra nec, fringilla in, laoreet vitae, risus.
204
205               > Donec sit amet nisl. Aliquam semper ipsum sit amet
206                velit. Suspendisse id sem consectetuer libero luctus
207                 adipiscing.
208
209     Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding
210     additional levels of `>`:
211
212               > This is the first level of quoting.
213               >
214               > > This is nested blockquote.
215               >
216               > Back to the first level.
217
218     Blockquotes can contain other Markdown elements, including headers,
219     lists, and code blocks:
220
221                   > ## This is a header.
222                   >
223                   > 1.   This is the first list item.
224                   > 2.   This is the second list item.
225                   >
226                   > Here's some example code:
227                   >
228                   >     return shell_exec("echo $input | $markdown_script");
229
230     Any decent text editor should make email-style quoting easy. For example,
231     with BBEdit, you can make a selection and choose Increase Quote Level
232     from the Text menu.
233
234   Lists
235     Markdown supports ordered (numbered) and unordered (bulleted) lists.
236
237     Unordered lists use asterisks, pluses, and hyphens -- interchangably --
238     as list markers:
239
240               *   Red
241               *   Green
242               *   Blue
243
244     is equivalent to:
245
246               +   Red
247               +   Green
248               +   Blue
249
250     and:
251
252               -   Red
253               -   Green
254               -   Blue
255
256     Ordered lists use numbers followed by periods:
257
258               1.  Bird
259               2.  McHale
260               3.  Parish
261
262     It's important to note that the actual numbers you use to mark the list
263     have no effect on the HTML output Markdown produces. The HTML Markdown
264     produces from the above list is:
265
266               <ol>
267               <li>Bird</li>
268               <li>McHale</li>
269               <li>Parish</li>
270               </ol>
271
272     If you instead wrote the list in Markdown like this:
273
274               1.  Bird
275               1.  McHale
276               1.  Parish
277
278     or even:
279
280               3. Bird
281               1. McHale
282               8. Parish
283
284     you'd get the exact same HTML output. The point is, if you want to, you
285     can use ordinal numbers in your ordered Markdown lists, so that the num‐
286     bers in your source match the numbers in your published HTML.  But if you
287     want to be lazy, you don't have to.
288
289     If you do use lazy list numbering, however, you should still start the
290     list with the number 1. At some point in the future, Markdown may support
291     starting ordered lists at an arbitrary number.
292
293     List markers typically start at the left margin, but may be indented by
294     up to three spaces. List markers must be followed by one or more spaces
295     or a tab.
296
297     To make lists look nice, you can wrap items with hanging indents:
298
299               *   Lorem ipsum dolor sit amet, consectetuer adipiscing
300                   elit. Aliquam hendrerit mi posuere lectus. Vestibulum
301                   enim wisi, viverra nec, fringilla in, laoreet vitae,
302                   risus.
303               *   Donec sit amet nisl. Aliquam semper ipsum sit amet
304                   velit. Suspendisse id sem consectetuer libero luctus
305                   adipiscing.
306
307     But if you want to be lazy, you don't have to:
308
309               *   Lorem ipsum dolor sit amet, consectetuer adipiscing
310               elit. Aliquam hendrerit mi posuere lectus. Vestibulum
311               enim wisi, viverra nec, fringilla in, laoreet vitae,
312               risus.
313               *   Donec sit amet nisl. Aliquam semper ipsum sit amet
314               velit. Suspendisse id sem consectetuer libero luctus
315               adipiscing.
316
317     If list items are separated by blank lines, Markdown will wrap the items
318     in `<p>` tags in the HTML output. For example, this input:
319
320               *   Bird
321               *   Magic
322
323     will turn into:
324
325               <ul>
326               <li>Bird</li>
327               <li>Magic</li>
328               </ul>
329
330     But this:
331
332               *   Bird
333
334               *   Magic
335
336     will turn into:
337
338               <ul>
339               <li><p>Bird</p></li>
340               <li><p>Magic</p></li>
341               </ul>
342
343     List items may consist of multiple paragraphs. Each subsequent paragraph
344     in a list item must be intended by either 4 spaces or one tab:
345
346               1.  This is a list item with two paragraphs. Lorem ipsum
347                   dolor sit amet, consectetuer adipiscing elit. Aliquam
348                   hendrerit mi posuere lectus.
349
350                   Vestibulum enim wisi, viverra nec, fringilla in,
351                   laoreet vitae, risus. Donec sit amet nisl. Aliquam
352                   semper ipsum sit amet velit.
353
354               2.  Suspendisse id sem consectetuer libero luctus
355                   adipiscing.
356
357     It looks nice if you indent every line of the subsequent paragraphs, but
358     here again, Markdown will allow you to be lazy:
359
360               *   This is a list item with two paragraphs.
361
362                   This is the second paragraph in the list item.
363                   You're only required to indent the first line. Lorem
364                   ipsum dolor sit amet, consectetuer adipiscing elit.
365
366               *   Another item in the same list.
367
368     To put a blockquote within a list item, the blockquote's `>` delimiters
369     need to be indented:
370
371               *   A list item with a blockquote:
372
373                   > This is a blockquote
374                   > inside a list item.
375
376     To put a code block within a list item, the code block needs to be
377     indented *twice* -- 8 spaces or two tabs:
378
379               *   A list item with a code block:
380
381                       <code goes here>
382
383     It's worth noting that it's possible to trigger an ordered list by acci‐
384     dent, by writing something like this:
385
386               1986. What a great season.
387
388     In other words, a *number-period-space* sequence at the beginning of a
389     line. To avoid this, you can backslash-escape the period:
390
391               1986\. What a great season.
392
393   Code Blocks
394     Pre-formatted code blocks are used for writing about programming or
395     markup source code. Rather than forming normal paragraphs, the lines of a
396     code block are interpreted literally. Markdown wraps a code block in both
397     `<pre>` and `<code>` tags.
398
399     To produce a code block in Markdown, simply indent every line of the
400     block by at least 4 spaces or 1 tab. For example, given this input:
401
402               This is a normal paragraph:
403
404                   This is a code block.
405
406     Markdown will generate:
407
408               <p>This is a normal paragraph:</p>
409
410               <pre><code>This is a code block.
411               </code></pre>
412
413     One level of indentation -- 4 spaces or 1 tab -- is removed from each
414     line of the code block. For example, this:
415
416               Here is an example of AppleScript:
417
418                   tell application "Foo"
419                       beep
420                   end tell
421
422     will turn into:
423
424               <p>Here is an example of AppleScript:</p>
425
426               <pre><code>tell application "Foo"
427                   beep
428               end tell
429               </code></pre>
430
431     A code block continues until it reaches a line that is not indented (or
432     the end of the article).
433
434     Within a code block, ampersands (`&`) and angle brackets (`<` and `>`)
435     are automatically converted into HTML entities. This makes it very easy
436     to include example HTML source code using Markdown -- just paste it and
437     indent it, and Markdown will handle the hassle of encoding the ampersands
438     and angle brackets. For example, this:
439
440                   <div class="footer">
441                       &copy; 2004 Foo Corporation
442                   </div>
443
444     will turn into:
445
446               <pre><code>&lt;div class="footer"&gt;
447                   &amp;copy; 2004 Foo Corporation
448               &lt;/div&gt;
449               </code></pre>
450
451     Regular Markdown syntax is not processed within code blocks. E.g., aster‐
452     isks are just literal asterisks within a code block. This means it's also
453     easy to use Markdown to write about Markdown's own syntax.
454
455   Horizontal Rules
456     You can produce a horizontal rule tag (`<hr />`) by placing three or more
457     hyphens, asterisks, or underscores on a line by themselves. If you wish,
458     you may use spaces between the hyphens or asterisks. Each of the follow‐
459     ing lines will produce a horizontal rule:
460
461               * * *
462
463               ***
464
465               *****
466
467               - - -
468
469               ---------------------------------------
470

Span Elements

472   Links
473     Markdown supports two style of links: inline and reference.
474
475     In both styles, the link text is delimited by [square brackets].
476
477     To create an inline link, use a set of regular parentheses immediately
478     after the link text's closing square bracket. Inside the parentheses, put
479     the URL where you want the link to point, along with an *optional* title
480     for the link, surrounded in quotes. For example:
481
482               This is [an example](http://example.com/ "Title") inline link.
483
484               [This link](http://example.net/) has no title attribute.
485
486     Will produce:
487
488               <p>This is <a href="http://example.com/" title="Title">
489               an example</a> inline link.</p>
490
491               <p><a href="http://example.net/">This link</a> has no
492               title attribute.</p>
493
494     If you're referring to a local resource on the same server, you can use
495     relative paths:
496
497               See my [About](/about/) page for details.
498
499     Reference-style links use a second set of square brackets, inside which
500     you place a label of your choosing to identify the link:
501
502               This is [an example][id] reference-style link.
503
504     You can optionally use a space to separate the sets of brackets:
505
506               This is [an example] [id] reference-style link.
507
508     Then, anywhere in the document, you define your link label like this, on
509     a line by itself:
510
511               [id]: http://example.com/  "Optional Title Here"
512
513     That is:
514
515     ·   Square brackets containing the link identifier (optionally indented
516         from the left margin using up to three spaces);
517
518     ·   followed by a colon;
519
520     ·   followed by one or more spaces (or tabs);
521
522     ·   followed by the URL for the link;
523
524     ·   optionally followed by a title attribute for the link, enclosed in
525         double or single quotes, or enclosed in parentheses.
526
527     The following three link definitions are equivalent:
528
529                   [foo]: http://example.com/  "Optional Title Here"
530                   [foo]: http://example.com/  'Optional Title Here'
531                   [foo]: http://example.com/  (Optional Title Here)
532
533     Note: There is a known bug in Markdown.pl 1.0.1 which prevents single
534     quotes from being used to delimit link titles.
535
536     The link URL may, optionally, be surrounded by angle brackets:
537
538               [id]: <http://example.com/>  "Optional Title Here"
539
540     You can put the title attribute on the next line and use extra spaces or
541     tabs for padding, which tends to look better with longer URLs:
542
543               [id]: http://example.com/longish/path/to/resource/here
544                   "Optional Title Here"
545
546     Link definitions are only used for creating links during Markdown pro‐
547     cessing, and are stripped from your document in the HTML output.
548
549     Link definition names may constist of letters, numbers, spaces, and punc‐
550     tuation -- but they are not case sensitive. E.g. these two links:
551
552                   [link text][a]
553                   [link text][A]
554
555     are equivalent.
556
557     The implicit link name shortcut allows you to omit the name of the link,
558     in which case the link text itself is used as the name.  Just use an
559     empty set of square brackets -- e.g., to link the word "Google" to the
560     google.com web site, you could simply write:
561
562                   [Google][]
563
564     And then define the link:
565
566                   [Google]: http://google.com/
567
568     Because link names may contain spaces, this shortcut even works for mul‐
569     tiple words in the link text:
570
571                   Visit [Daring Fireball][] for more information.
572
573     And then define the link:
574
575                   [Daring Fireball]: http://daringfireball.net/
576
577     Link definitions can be placed anywhere in your Markdown document. I tend
578     to put them immediately after each paragraph in which they're used, but
579     if you want, you can put them all at the end of your document, sort of
580     like footnotes.
581
582     Here's an example of reference links in action:
583
584               I get 10 times more traffic from [Google] [1] than from
585               [Yahoo] [2] or [MSN] [3].
586
587                 [1]: http://google.com/        "Google"
588                 [2]: http://search.yahoo.com/  "Yahoo Search"
589                 [3]: http://search.msn.com/    "MSN Search"
590
591     Using the implicit link name shortcut, you could instead write:
592
593               I get 10 times more traffic from [Google][] than from
594               [Yahoo][] or [MSN][].
595
596                 [google]: http://google.com/        "Google"
597                 [yahoo]:  http://search.yahoo.com/  "Yahoo Search"
598                 [msn]:    http://search.msn.com/    "MSN Search"
599
600     Both of the above examples will produce the following HTML output:
601
602               <p>I get 10 times more traffic from <a href="http://google.com/"
603               title="Google">Google</a> than from
604               <a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a>
605               or
606               <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
607
608     For comparison, here is the same paragraph written using Markdown's
609     inline link style:
610
611               I get 10 times more traffic from
612               [Google](http://google.com/ "Google") than from
613               [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
614               [MSN](http://search.msn.com/ "MSN Search").
615
616     The point of reference-style links is not that they're easier to write.
617     The point is that with reference-style links, your document source is
618     vastly more readable. Compare the above examples: using reference-style
619     links, the paragraph itself is only 81 characters long; with inline-style
620     links, it's 176 characters; and as raw HTML, it's 234 characters. In the
621     raw HTML, there's more markup than there is text.
622
623     With Markdown's reference-style links, a source document much more
624     closely resembles the final output, as rendered in a browser. By allowing
625     you to move the markup-related metadata out of the paragraph, you can add
626     links without interrupting the narrative flow of your prose.
627
628   Emphasis
629     Markdown treats asterisks (`*`) and underscores (`_`) as indicators of
630     emphasis. Text wrapped with one `*` or `_` will be wrapped with an HTML
631     `<em>` tag; double `*`'s or `_`'s will be wrapped with an HTML `<strong>`
632     tag. E.g., this input:
633
634               *single asterisks*
635
636               _single underscores_
637
638               **double asterisks**
639
640               __double underscores__
641
642     will produce:
643
644               <em>single asterisks</em>
645
646               <em>single underscores</em>
647
648               <strong>double asterisks</strong>
649
650               <strong>double underscores</strong>
651
652     You can use whichever style you prefer; the lone restriction is that the
653     same character must be used to open and close an emphasis span.
654
655     Emphasis can be used in the middle of a word:
656
657               un*fucking*believable
658
659     But if you surround an `*` or `_` with spaces, it'll be treated as a lit‐
660     eral asterisk or underscore.
661
662     To produce a literal asterisk or underscore at a position where it would
663     otherwise be used as an emphasis delimiter, you can backslash escape it:
664
665               \*this text is surrounded by literal asterisks\*
666
667   Code
668     To indicate a span of code, wrap it with backtick quotes (`` ` ``).
669     Unlike a pre-formatted code block, a code span indicates code within a
670     normal paragraph. For example:
671
672               Use the `printf()` function.
673
674     will produce:
675
676               <p>Use the <code>printf()</code> function.</p>
677
678     To include a literal backtick character within a code span, you can use
679     multiple backticks as the opening and closing delimiters:
680
681               ``There is a literal backtick (`) here.``
682
683     which will produce this:
684
685               <p><code>There is a literal backtick (`) here.</code></p>
686
687     The backtick delimiters surrounding a code span may include spaces -- one
688     after the opening, one before the closing. This allows you to place lit‐
689     eral backtick characters at the beginning or end of a code span:
690
691                   A single backtick in a code span: `` ` ``
692
693                   A backtick-delimited string in a code span: `` `foo` ``
694
695     will produce:
696
697                   <p>A single backtick in a code span: <code>`</code></p>
698
699                   <p>A backtick-delimited string in a code span: <code>`foo`</code></p>
700
701     With a code span, ampersands and angle brackets are encoded as HTML enti‐
702     ties automatically, which makes it easy to include example HTML tags.
703     Markdown will turn this:
704
705               Please don't use any `<blink>` tags.
706
707     into:
708
709               <p>Please don't use any <code>&lt;blink&gt;</code> tags.</p>
710
711     You can write this:
712
713               `&#8212;` is the decimal-encoded equivalent of `&mdash;`.
714
715     to produce:
716
717               <p><code>&amp;#8212;</code> is the decimal-encoded
718               equivalent of <code>&amp;mdash;</code>.</p>
719
720   Images
721     Admittedly, it's fairly difficult to devise a "natural" syntax for plac‐
722     ing images into a plain text document format.
723
724     Markdown uses an image syntax that is intended to resemble the syntax for
725     links, allowing for two styles: inline and reference.
726
727     Inline image syntax looks like this:
728
729               ![Alt text](/path/to/img.jpg)
730
731               ![Alt text](/path/to/img.jpg =Optional size "Optional title")
732
733     That is:
734
735     ·   An exclamation mark: `!`;
736
737     ·   followed by a set of square brackets, containing the `alt` attribute
738         text for the image;
739
740     ·   followed by a set of parentheses, containing the URL or path to the
741         image, an optional `size` attribute (in width c height format) pre‐
742         fixed with a `=`, and an optional `title` attribute enclosed in dou‐
743         ble or single quotes.
744
745     Reference-style image syntax looks like this:
746
747               ![Alt text][id]
748
749     Where "id" is the name of a defined image reference. Image references are
750     defined using syntax identical to link references:
751
752               [id]: url/to/image  =Optional size "Optional title attribute"
753

Miscellaneous

755   Automatic Links
756     Markdown supports a shortcut style for creating "automatic" links for
757     URLs and email addresses: simply surround the URL or email address with
758     angle brackets. What this means is that if you want to
759      show the actual text of a URL or email address, and also have it be
760       a clickable link, you can do this:
761
762               <http://example.com/>
763
764     Markdown will turn this into:
765
766               <a href="http://example.com/">http://example.com/</a>
767
768     Automatic links for email addresses work similarly, except that Markdown
769     will also perform a bit of randomized decimal and hex entity-encoding to
770     help obscure your address from address-harvesting spambots. For example,
771     Markdown will turn this:
772
773               <address@example.com>
774
775     into something like this:
776
777               <a href="&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
778               &#115;&#115;&#64;&#101;&#120;&#x61;&#109;&#x70;&#x6C;e&#x2E;&#99;&#111;
779               &#109;">&#x61;&#x64;&#x64;&#x72;&#x65;&#115;&#115;&#64;&#101;&#120;&#x61;
780               &#109;&#x70;&#x6C;e&#x2E;&#99;&#111;&#109;</a>
781
782     which will render in a browser as a clickable link to
783     "address@example.com".
784
785     (This sort of entity-encoding trick will indeed fool many, if not most,
786     address-harvesting bots, but it definitely won't fool all of them. It's
787     better than nothing, but an address published in this way will probably
788     eventually start receiving spam.)
789
790   Backslash Escapes
791     Markdown allows you to use backslash escapes to generate literal charac‐
792     ters which would otherwise have special meaning in Markdown's formatting
793     syntax. For example, if you wanted to surround a word with literal aster‐
794     isks (instead of an HTML `<em>` tag), you add backslashes before the
795     asterisks, like this:
796
797               \*literal asterisks\*
798
799     Markdown provides backslash escapes for the following characters:
800     backslash
801     `             backtick
802     *             asterisk
803     _             underscore
804                   curly braces
805     []            square brackets
806     ()            parentheses
807     #             hash mark
808     +             plus sign
809     -             minus sign (hyphen)
810     .             dot
811                   exclamation mark
812

BUGS

814     Markdown assumes that tabs are set to 4 spaces.
815

AUTHOR

817     John Gruber http://daringfireball.net/
818

SEE ALSO

820     markdown(1), markdown(3), mkd-callbacks(3), mkd-functions(3),
821     mkd-extensions(7).
822
823     http://daringfireball.net/projects/markdown
824     http://docutils.sourceforge.net/mirror/setext.html
825     http://www.aaronsw.com/2002/atx/
826     http://textism.com/tools/textile/
827     http://docutils.sourceforge.net/rst.html
828     http://www.triptico.com/software/grutatxt.html
829     http://ettext.taint.org/doc/
830
831MASTODON                         Dec 22, 2007                         MASTODON
Impressum