Blame test/import-with-vendor-app/app/vendor/github.com/russross/blackfriday/testdata/Markdown Documentation - Basics.html

33370d6

Markdown: Basics

33370d6
33370d6
    33370d6
        
  • Main
  • 33370d6
        
  • Basics
  • 33370d6
        
  • Syntax
  • 33370d6
        
  • License
  • 33370d6
        
  • Dingus
  • 33370d6
    33370d6
    33370d6

    Getting the Gist of Markdown's Formatting Syntax

    33370d6
    33370d6

    This page offers a brief overview of what it's like to use Markdown.

    33370d6
    The syntax page provides complete, detailed documentation for
    33370d6
    every feature, but Markdown should be very easy to pick up simply by
    33370d6
    looking at a few examples of it in action. The examples on this page
    33370d6
    are written in a before/after style, showing example syntax and the
    33370d6
    HTML output produced by Markdown.

    33370d6
    33370d6

    It's also helpful to simply try Markdown out; the Dingus is a

    33370d6
    web application that allows you type your own Markdown-formatted text
    33370d6
    and translate it to XHTML.

    33370d6
    33370d6

    Note: This document is itself written using Markdown; you

    33370d6
    can see the source for it by adding '.text' to the URL.

    33370d6
    33370d6

    Paragraphs, Headers, Blockquotes

    33370d6
    33370d6

    A paragraph is simply one or more consecutive lines of text, separated

    33370d6
    by one or more blank lines. (A blank line is any line that looks like a
    33370d6
    blank line -- a line containing nothing spaces or tabs is considered
    33370d6
    blank.) Normal paragraphs should not be intended with spaces or tabs.

    33370d6
    33370d6

    Markdown offers two styles of headers: Setext and atx.

    33370d6
    Setext-style headers for <h1> and <h2> are created by
    33370d6
    "underlining" with equal signs (=) and hyphens (-), respectively.
    33370d6
    To create an atx-style header, you put 1-6 hash marks (#) at the
    33370d6
    beginning of the line -- the number of hashes equals the resulting
    33370d6
    HTML header level.

    33370d6
    33370d6

    Blockquotes are indicated using email-style '>' angle brackets.

    33370d6
    33370d6

    Markdown:

    33370d6
    33370d6
    A First Level Header
    33370d6
    ====================
    33370d6
    33370d6
    A Second Level Header
    33370d6
    ---------------------
    33370d6
    33370d6
    Now is the time for all good men to come to
    33370d6
    the aid of their country. This is just a
    33370d6
    regular paragraph.
    33370d6
    33370d6
    The quick brown fox jumped over the lazy
    33370d6
    dog's back.
    33370d6
    33370d6
    ### Header 3
    33370d6
    33370d6
    > This is a blockquote.
    33370d6
    > 
    33370d6
    > This is the second paragraph in the blockquote.
    33370d6
    >
    33370d6
    > ## This is an H2 in a blockquote
    33370d6
    33370d6
    33370d6

    Output:

    33370d6
    33370d6
    <h1>A First Level Header</h1>
    33370d6
    33370d6
    <h2>A Second Level Header</h2>
    33370d6
    33370d6
    <p>Now is the time for all good men to come to
    33370d6
    the aid of their country. This is just a
    33370d6
    regular paragraph.</p>
    33370d6
    33370d6
    <p>The quick brown fox jumped over the lazy
    33370d6
    dog's back.</p>
    33370d6
    33370d6
    <h3>Header 3</h3>
    33370d6
    33370d6
    <blockquote>
    33370d6
        <p>This is a blockquote.</p>
    33370d6
    33370d6
        <p>This is the second paragraph in the blockquote.</p>
    33370d6
    33370d6
        <h2>This is an H2 in a blockquote</h2>
    33370d6
    </blockquote>
    33370d6
    33370d6
    33370d6

    Phrase Emphasis

    33370d6
    33370d6

    Markdown uses asterisks and underscores to indicate spans of emphasis.

    33370d6
    33370d6

    Markdown:

    33370d6
    33370d6
    Some of these words *are emphasized*.
    33370d6
    Some of these words _are emphasized also_.
    33370d6
    33370d6
    Use two asterisks for **strong emphasis**.
    33370d6
    Or, if you prefer, __use two underscores instead__.
    33370d6
    33370d6
    33370d6

    Output:

    33370d6
    33370d6
    <p>Some of these words <em>are emphasized</em>.
    33370d6
    Some of these words <em>are emphasized also</em>.</p>
    33370d6
    33370d6
    <p>Use two asterisks for <strong>strong emphasis</strong>.
    33370d6
    Or, if you prefer, <strong>use two underscores instead</strong>.</p>
    33370d6
    33370d6
    33370d6

    Lists

    33370d6
    33370d6

    Unordered (bulleted) lists use asterisks, pluses, and hyphens (*,

    33370d6
    +, and -) as list markers. These three markers are
    33370d6
    interchangable; this:

    33370d6
    33370d6
    *   Candy.
    33370d6
    *   Gum.
    33370d6
    *   Booze.
    33370d6
    33370d6
    33370d6

    this:

    33370d6
    33370d6
    +   Candy.
    33370d6
    +   Gum.
    33370d6
    +   Booze.
    33370d6
    33370d6
    33370d6

    and this:

    33370d6
    33370d6
    -   Candy.
    33370d6
    -   Gum.
    33370d6
    -   Booze.
    33370d6
    33370d6
    33370d6

    all produce the same output:

    33370d6
    33370d6
    <ul>
    33370d6
    <li>Candy.</li>
    33370d6
    <li>Gum.</li>
    33370d6
    <li>Booze.</li>
    33370d6
    </ul>
    33370d6
    33370d6
    33370d6

    Ordered (numbered) lists use regular numbers, followed by periods, as

    33370d6
    list markers:

    33370d6
    33370d6
    1.  Red
    33370d6
    2.  Green
    33370d6
    3.  Blue
    33370d6
    33370d6
    33370d6

    Output:

    33370d6
    33370d6
    <ol>
    33370d6
    <li>Red</li>
    33370d6
    <li>Green</li>
    33370d6
    <li>Blue</li>
    33370d6
    </ol>
    33370d6
    33370d6
    33370d6

    If you put blank lines between items, you'll get <p> tags for the

    33370d6
    list item text. You can create multi-paragraph list items by indenting
    33370d6
    the paragraphs by 4 spaces or 1 tab:

    33370d6
    33370d6
    *   A list item.
    33370d6
    33370d6
        With multiple paragraphs.
    33370d6
    33370d6
    *   Another item in the list.
    33370d6
    33370d6
    33370d6

    Output:

    33370d6
    33370d6
    <ul>
    33370d6
    <li><p>A list item.</p>
    33370d6
    <p>With multiple paragraphs.</p></li>
    33370d6
    <li><p>Another item in the list.</p></li>
    33370d6
    </ul>
    33370d6
    33370d6
    33370d6

    Links

    33370d6
    33370d6

    Markdown supports two styles for creating links: inline and

    33370d6
    reference. With both styles, you use square brackets to delimit the
    33370d6
    text you want to turn into a link.

    33370d6
    33370d6

    Inline-style links use parentheses immediately after the link text.

    33370d6
    For example:

    33370d6
    33370d6
    This is an [example link](http://example.com/).
    33370d6
    33370d6
    33370d6

    Output:

    33370d6
    33370d6
    <p>This is an <a href="http://example.com/">
    33370d6
    example link</a>.</p>
    33370d6
    33370d6
    33370d6

    Optionally, you may include a title attribute in the parentheses:

    33370d6
    33370d6
    This is an [example link](http://example.com/ "With a Title").
    33370d6
    33370d6
    33370d6

    Output:

    33370d6
    33370d6
    <p>This is an <a href="http://example.com/" title="With a Title">
    33370d6
    example link</a>.</p>
    33370d6
    33370d6
    33370d6

    Reference-style links allow you to refer to your links by names, which

    33370d6
    you define elsewhere in your document:

    33370d6
    33370d6
    I get 10 times more traffic from [Google][1] than from
    33370d6
    [Yahoo][2] or [MSN][3].
    33370d6
    33370d6
    [1]: http://google.com/        "Google"
    33370d6
    [2]: http://search.yahoo.com/  "Yahoo Search"
    33370d6
    [3]: http://search.msn.com/    "MSN Search"
    33370d6
    33370d6
    33370d6

    Output:

    33370d6
    33370d6
    <p>I get 10 times more traffic from <a href="http://google.com/"
    33370d6
    title="Google">Google</a> than from <a href="http://search.yahoo.com/"
    33370d6
    title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
    33370d6
    title="MSN Search">MSN</a>.</p>
    33370d6
    33370d6
    33370d6

    The title attribute is optional. Link names may contain letters,

    33370d6
    numbers and spaces, but are not case sensitive:

    33370d6
    33370d6
    I start my morning with a cup of coffee and
    33370d6
    [The New York Times][NY Times].
    33370d6
    33370d6
    [ny times]: http://www.nytimes.com/
    33370d6
    33370d6
    33370d6

    Output:

    33370d6
    33370d6
    <p>I start my morning with a cup of coffee and
    33370d6
    <a href="http://www.nytimes.com/">The New York Times</a>.</p>
    33370d6
    33370d6
    33370d6

    Images

    33370d6
    33370d6

    Image syntax is very much like link syntax.

    33370d6
    33370d6

    Inline (titles are optional):

    33370d6
    33370d6
    ![alt text](/path/to/img.jpg "Title")
    33370d6
    33370d6
    33370d6

    Reference-style:

    33370d6
    33370d6
    ![alt text][id]
    33370d6
    33370d6
    [id]: /path/to/img.jpg "Title"
    33370d6
    33370d6
    33370d6

    Both of the above examples produce the same output:

    33370d6
    33370d6
    <img src="/path/to/img.jpg" alt="alt text" title="Title" />
    33370d6
    33370d6
    33370d6

    Code

    33370d6
    33370d6

    In a regular paragraph, you can create code span by wrapping text in

    33370d6
    backtick quotes. Any ampersands (&) and angle brackets (< or
    33370d6
    >) will automatically be translated into HTML entities. This makes
    33370d6
    it easy to use Markdown to write about HTML example code:

    33370d6
    33370d6
    I strongly recommend against using any `<blink>` tags.
    33370d6
    33370d6
    I wish SmartyPants used named entities like `&mdash;`
    33370d6
    instead of decimal-encoded entites like `&#8212;`.
    33370d6
    33370d6
    33370d6

    Output:

    33370d6
    33370d6
    <p>I strongly recommend against using any
    33370d6
    <code>&lt;blink&gt;</code> tags.</p>
    33370d6
    33370d6
    <p>I wish SmartyPants used named entities like
    33370d6
    <code>&amp;mdash;</code> instead of decimal-encoded
    33370d6
    entites like <code>&amp;#8212;</code>.</p>
    33370d6
    33370d6
    33370d6

    To specify an entire block of pre-formatted code, indent every line of

    33370d6
    the block by 4 spaces or 1 tab. Just like with code spans, &, <,
    33370d6
    and > characters will be escaped automatically.

    33370d6
    33370d6

    Markdown:

    33370d6
    33370d6
    If you want your page to validate under XHTML 1.0 Strict,
    33370d6
    you've got to put paragraph tags in your blockquotes:
    33370d6
    33370d6
        <blockquote>
    33370d6
            <p>For example.</p>
    33370d6
        </blockquote>
    33370d6
    33370d6
    33370d6

    Output:

    33370d6
    33370d6
    <p>If you want your page to validate under XHTML 1.0 Strict,
    33370d6
    you've got to put paragraph tags in your blockquotes:</p>
    33370d6
    33370d6
    <pre><code>&lt;blockquote&gt;
    33370d6
        &lt;p&gt;For example.&lt;/p&gt;
    33370d6
    &lt;/blockquote&gt;
    33370d6
    </code></pre>
    33370d6