The soLinkable Blog

May/09

19

Comments – Markdown is Enabled

What exactly does that mean? Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML). If you are a frequent Reddit commenter you will be very familiar with it as it uses the same system.

How does this benefit you, the commenter? The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that 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.

How does it work? A full instructional guide can be found under syntax on the project website or check out the Dingus to try out a live version of Markdown. But first, let me give you a quick and easy overview:

Paragraphs are delimited by a blank line. Simply starting text on a new line won’t create a new paragraph; It will remain on the same line in the final, rendered version as the previous line. You need an extra, blank line to start a new paragraph. This is especially important when dealing with quotes or lists.

Italic text can be displayed by surrounding a word (or words) with either single asterisks (*) or single underscores (_). Bold text can be displayed by surrounding a word (or words) with either double asterisks (**) or double underscores (__).

This is in *italic text*

This is in **bold text**

Will give you:

bold_italic

Blockquotes are created by using email-style > characters. Multiple angle brackets can be used for nested quotes. To cause a new paragraph to be quoted, begin that paragraph with another angle bracket.

>Here's a quote.

>Another paragraph in the same quote.
>>A nested quote.

>Back to a single quote.

Will give you:

blockquote

Linking can be done in two ways. First, you can just paste a valid URL, which will be automatically parsed as a link. Or, you can write the anchor text inside of square brackets – [ ] – followed by the URL in parentheses.

http://en.wikipedia.org
[wikipedia]http://en.wikipedia.org

Will give you:

links

Headers can be created by surrounding the text with the # symbol. The number of #’s used corresponds with the header level.

# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6

Will give you:

headers

Unordered Lists can be created by appending each element in the list with either a plus (+), dash (-), or asterisk (*) followed by a space. Operators can also be mixed.

+ Item 1
- Item 2
* Item 3

Will give you:

unordered_list

Ordered lists are created in roughly the same way. Begin the list with a number plus a period (.) followed by a space. It’s important to note that the actual numbers you use to mark the list have no effect on the output. The ordered list will always start with the number 1, and will increment sequentially.

1. Item 1
2. Item 2
3. Item 3

Will give you:

ordered_list

Code Blocks are created by wrapping it with backtick quotes (`).

Here is some `inline code with **formatting**`

Will give you:

code_text

Escaping special characters can be done with a backslash (\). Backslash escapes are used to generate literal characters which would otherwise have special meaning in Markdown’s formatting syntax.

Escaped \*italics\*

Will give you:

escaped_characters

That’s it! There are other great ways to use Markdown, but we’ll leave that until later posts. Thanks to redditor AnteChronos for his great explanation as well (much of which I used in this post).

, ,

No comments yet.

Leave a comment!

<<

>>