This should cover 99% of your PyCon Markdown needs.
Pro-tip: Make sure your submission looks good
Always add extra newlines/breaks between blocks and elements. The official documentation isn't clear on this issue, and not all parsers support the requirement of newlines/breaks between blocks.
Blockquotes
To enclose a segment of text in blockquotes, one must prefix each written line
with a less-than sign. Don't forget to add a newline before creating a blockquote.
Markdown:
> ## Blockquoted header
>
> This is blockquoted text.
>
> This is a second paragraph within the blockquoted text.
Output:
<blockquote>
<h2>Blockquoted header</h2>
<p>This is blockquoted text.</p>
<p>This is a second paragraph within the blockquoted text.</p>
</blockquote>
Code: Block
To specify an entire block of pre-formatted code, indent every line of the block by 1 tab or 4 spaces. Ampersands and angle brackets will automatically be translated into HTML entities. Don't forget to add a newline before creating a code block.
Markdown:
If you want to mark something as code, indent it by 4 spaces.
<p>This has been indented 4 spaces.</p>
Output:
<p>If you want to mark something as code, indent it by 4 spaces.</p>
<p>This has been indented 4 spaces.</p>
Code: Inline
Inline code descriptions can be done via the use of the backtick quotes. Any ampersands and angle brackets will automatically be translated into HTML entities.
Markdown:
Markdown is a `<em>text-to-html</em>` conversion tool for writers.
Output:
<p>Markdown is a `<em>text-to-html</em>` conversion tool for writers.</p>
Emphasis: Italics
To emphasize text wrap it with either a asterisk or underscore.
Markdown:
This is *emphasized* _text_.
Output:
.. code-block:: html
<p>This is <em>emphasized</em> <em>text</em>.</p>
Emphasis: Strong
To boldly emphasize text, wrap it with either double asterisks or double underscores.
Markdown:
This is very heavily **emphasized** __text__.
Output:
<p>This is very heavily <strong>emphasized</strong> <strong>text</strong>.</p>
Headers
HTML headings are produced by placing a number of hashes before the header
text corresponding to the level of heading desired (HTML offers six levels of
headings). Don't forget to add a newline before creating a header.
You can create a horizontal rule (<hr />) by placing 3 or more phens, asterisks, or underscores on a single line. You can also place spaces between them. Don't forget to add a newline before creating a horizontal rule.
To force a line return, place two empty spaces at the end of a line.
Markdown:
Forcing a line-break\s\s
Next line in the list
Output:
Forcing a line-break<br>
Next line in the list
Links: Inline
Inline-style links use parentheses immediately after the link text.
Markdown:
This is an [example link](http://example.com/).
Output:
<p>This is an <a href="http://example.com/">example link</a>.</p>
Links: Inline with title
Markdown:
This is an [example link](http://example.com/ "With a Title").
Output:
<p>This is an <a href="http://example.com/"
title="With a Title">example link</a>.</p>
Links: Reference
Reference-style links allow you to refer to your links by names, which you define elsewhere.
Markdown:
This is a guide on Markdown [Markdown][1].
[1]: http://en.wikipedia.org/wiki/Markdown "Markdown"
Output:
<p>This is a guide on <a href="http://en.wikipedia.org/wiki/Markdown">Markdown</a>.</p>
Lists: Simple
Creating simple links is done by using plus, hyphens or asterisks as list markers. These list markers are interchangeable. Don't forget to add a newline before starting a list sequence.
A paragraph is one or more consecutive lines of text separated by one or more
blank lines. Normal paragraphs should not be indented with spaces or tabs. Don't forget to add a newline before creating a new paragraph.
Markdown:
This is a paragraph. It has two sentences.
This is another paragraph. It also has two sentences.
Output:
<p>This is a paragraph. It has two sentences.</p>
<p>This is another paragraph. It also has two sentences.</p>
Markdown Guide
This should cover 99% of your PyCon Markdown needs.
Pro-tip: Make sure your submission looks good
Always add extra newlines/breaks between blocks and elements. The official documentation isn't clear on this issue, and not all parsers support the requirement of newlines/breaks between blocks.
Blockquotes
To enclose a segment of text in blockquotes, one must prefix each written line with a less-than sign. Don't forget to add a newline before creating a blockquote.
Markdown:
Output:
Code: Block
To specify an entire block of pre-formatted code, indent every line of the block by 1 tab or 4 spaces. Ampersands and angle brackets will automatically be translated into HTML entities. Don't forget to add a newline before creating a code block.
Markdown:
Output:
Code: Inline
Inline code descriptions can be done via the use of the backtick quotes. Any ampersands and angle brackets will automatically be translated into HTML entities.
Markdown:
Output:
Emphasis: Italics
To emphasize text wrap it with either a asterisk or underscore.
Markdown:
Output:
.. code-block:: html
Emphasis: Strong
To boldly emphasize text, wrap it with either double asterisks or double underscores.
Markdown:
Output:
Headers
HTML headings are produced by placing a number of hashes before the header text corresponding to the level of heading desired (HTML offers six levels of headings). Don't forget to add a newline before creating a header.
Markdown:
Output:
Horizontal rules
You can create a horizontal rule (
<hr />
) by placing 3 or more phens, asterisks, or underscores on a single line. You can also place spaces between them. Don't forget to add a newline before creating a horizontal rule.Markdown:
Output:
Images: Inline
Image syntax is very similar to Link syntax, but prefixed with an exclamation point.
Markdown:
Output:
Line Return
To force a line return, place two empty spaces at the end of a line.
Markdown:
Output:
Links: Inline
Inline-style links use parentheses immediately after the link text.
Markdown:
Output:
Links: Inline with title
Markdown:
Output:
Links: Reference
Reference-style links allow you to refer to your links by names, which you define elsewhere.
Markdown:
Output:
Lists: Simple
Creating simple links is done by using plus, hyphens or asterisks as list markers. These list markers are interchangeable. Don't forget to add a newline before starting a list sequence.
Markdown:
Output:
Lists: Nested
Nest a list requires you to indent by exactly four spaces. Don't forget to add a newline before creating a list sequence.
Markdown:
Output:
Paragraphs
A paragraph is one or more consecutive lines of text separated by one or more blank lines. Normal paragraphs should not be indented with spaces or tabs. Don't forget to add a newline before creating a new paragraph.
Markdown:
Output: