This document only defines style and formatting rules for writing Markdown documents. It’s based on personal preferences and doesn’t pretend to be the “one and only” way of doing it.
- Use Unix newline character:
LF
. - Line length should be 80 characters or less.
- Use two spaces per indentation level.
- Remove all trailing whitespace that’s not intended to generate a line break.
- Always end files with a newline.
Psst, you may want to check my [presentation about whitespace] (http://speakerdeck.com/battaglr/why-you-should-care-about-whitespace).
- Use one to six hash characters to declare headings.
- Leave one space after the hash.
- Never use hash characters at the end.
- Insert a blank line after the heading.
#·Foobar¬
¬
Insert a blank line after each paragraph.
This is a paragraph.¬
¬
Use two spaces to declare (hard) line breaks.
Foo··
bar
Wrap text with asterisks to indicate emphasis.
Emphasis is usually displayed as *italics*, and strong emphasis as **bold**.
Wrap text with underscores when nesting emphasis declarations.
*You can nest __emphasis__ declarations*.
- Leave one space after the list marker.
- Avoid separating list items with blank lines.
-·Foo
-·Bar
Use decimal numbers followed by a dot to declare an ordered list item.
1. Foo
2. Bar
Use a dash to declare an unordered list item.
- Foo
- Bar
- Use three consecutive dash characters to declare an horizontal rule.
- Insert a blank line before and after.
¬
---
¬
The formatting rules described in this document are compliant with the original Markdown syntax and the CommonMark specification.
Do whatever you want with this, it’s public domain.