Markdown Reference

Markdown Reference

This document contains some of the most commonly used markdown syntax. :fire:

Line Break

Markdown treat new line in source file as space.
A new line can be achieved by [two space + hit enter]

A new paragraph is achieved by an empty line. [hit enter twice]

Text Style

italic or italic
bold or bold
italic and bold
strike through

Text Block

A quote block using >.

I’ve always been more interested in the future than in the past.

A code block using ```.

1
2
3
4
5
The Clarke and Wright Algorithm
  pick a start point
  calculate savings for all nodes
  sort the savings
  try merge from top

A code block using [empty line + 4 space].

1
2
3
4
block of
text
in Shakespeare's
style

A code block with color.

1
2
3
function test() {
 console.log("Need car wash.");
}

A inline code piece.
Let’s try select * from table;

Table

Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1

Colons can be used to align columns.
The outer pipes (|) are optional. There must be at least 3 dashes separating each header cell.

List

Use * - + for unordered list.

  • banana
  • o-range
  • apple

Use 1,2,3 for ordered list.

  1. item1
  2. item2, this can be any number
  3. item3

Use indent for sublist.

  • food
  • fruit (1 space)
    • apple (2 space)
      • fuji apple
  • water

Use indent for ordered list

  1. section 1
  2. section 1.A (1 space)
    1. section 1.A.a (3 space, don’t know why)
      1. section 1.A.a.I (3 space)
        This sub section lines up well.

Use [X] for todo list

  • this is a complete item
  • this is an incomplete item

Links are automatic.
This link is clickable http://github.com
You can visit GitHub.

Picture

Pictures are links with prefix of !.

Do it like a link:
alt text

Define a url and refer to it:
alt text

Escape

Use \ for escape special characters. (*, `, etc)

Use # 1 - 6 times for headers.

  • This is an <h1> tag

  • This is an <h2> tag

  • This is an <h6> tag

Emoji

:kissing_closed_eyes: :kissing_smiling_eyes: :grinning: :grin: :satisfied:

:flushed: :relieved: :sob:

:broken_heart: :shit: :fire:

:scream: :joy:

:+1: :ok_hand: