Skip to content

Conventions for Markdown editing

Nikos Anastopoulos edited this page Feb 23, 2016 · 4 revisions

Markdown is WYSIWYG

The phisolophy of Markdown is that the unrendered text should be visually similar to the rendered output. So take care and don't pollute the Markdown file with non-WYSIWYG content (e.g. comments in HTML).

Line width

80 chars, so that the text can be readable

Paragraphs

Leave a single empty line to start a new paragraph.

This is a new paragraph.

Headings

Use #s:

  • Level 1 heading: # Heading 1
  • Level 2 heading: ## Heading 2
  • Level 3 heading: ### Heading 3
  • etc

Bold text

__text in bold__ yields text in bold

Italics text

_text in italics_ yields text in italics

Bulleted lists

Use simple dashes for bullets.

- Item 1
- Item 2
- Item 3

yields:

  • Item 1
  • Item 2
  • Item 3

Numbered lists

1. Item A
2. Item B
3. Item C

yields:

  1. Item A
  2. Item B
  3. Item C

Nested lists

3 space identation should be added for every nesting level. All levels should be vertically aligned.

- Item 1.
  Continuation of Item 1 should be aligned vertically.
  Another continuation vertically aligned.
- Item 2
   - Item 2.A (idented by 3 spaces)
     Continuation of Item 2.A should also be aligned.
   - Item 2.B
- Item 3

yields:

  • Item 1. Continuation of Item 1 should be aligned vertically. Another continuation vertically aligned.
  • Item 2
    • Item 2.A (indented by 3 spaces) Continuation of Item 2.A should also be aligned.
    • Item 2.B
  • Item 3

Tables

Vertically align columns to the widest one. Leave 1 char space after and before the column separator (|).

| Column A      | Column B      |
|---------------|---------------|
| Row 1         | Row 1         |
| Row 2 foo     | Row 2 foo     |
| Row 3 foo bar | Row 3 foo bar |

yields:

Column A Column B
Row 1 Row 1
Row 2 foo Row 2 foo
Row 3 foo bar Row 3 foo bar

Don't do this:

| Column A | Column B |
|---------------|---------------|
| Row 1 | Row 1 |
| Row 2 foo | Row 2 foo |
| Row 3 foo bar | Row 3 foo bar |

You should respect the WYSIWYG philosophy of Markdown.

Inline code

Wrap inline snippets of code with single backtick quotes: foo

Code blocks

Use fences ``` to block in multiple lines of code. Specifying the code language to perform proper syntax highlighting:

x=1
y=2

Images

Put captions in double quotes as follows:

![Minion](http://octodex.github.com/images/minion.png "Image caption")

yields:

Minion

Links

[NSTAT github](https://github.com/intracom-telecom/nstat)

yields:

NSTAT github

Clone this wiki locally