Markdown: Basics (快速入门), http://wowubuntu.com/markdown/basic.html
http://daringfireball.net/projects/markdown/dingus, playground
https://help.github.com/articles/github-flavored-markdown, "GitHub Flavored Markdown" (GFM)
# Head1 ## Head2 ……
###### Head6
> This is a blockquote. > Continuing...... > > This is the second paragraph in the blockquote. > > ## This is an H2 in a blockquote
可以看到除非, 显示的增加空行, 否则是不会换行的
(GFM)
Github, 这里做了改进, 等同于一般的书写习惯, 默认换行 增加空行, 就会实际添加空行
_good_, *good*, 斜体 __man__, **good**, 加粗
(GFM)
对于多个连续_自动忽略, 不会做斜体处理 因为很多变量名都是
perform_complicated_taskGFM adds syntax to strikethrough text, which is missing from standard Markdown.
~~Mistaken text.~~becomes
Mistaken text.
无序列表,*,+,-,任一种都可以
* Candy. * Gum. * Booze.有序的列表
1. Red 2. Green 3. Blue
(GFM)
GFM will autolink standard URLs, so if you want to link to a URL (instead of setting link text)
两种方式,
反引号, 注意不是一般的引号,
I strongly recommend against using any `<blink>` tags.区块, 每行缩进 4 个空格或是一个 tab, 该区块会默认被认为是代码
(GFM)
每行增加4空格或tab, 很麻烦, GFM提高``` …… ```, 来标注代码段
``` function test() { console.log("notice the blank line before this function?"); } ```并且GFM提供Syntax highlighting, 只需要在```后面增加语言名the languages YAML file
```ruby require 'redcarpet' markdown = Redcarpet.new("Hello World!") puts markdown.to_html ```
Further, lists can be turned into Task Lists by prefacing list items with [ ] or [x] (incomplete or complete, respectively).
- [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> supported - [x] list syntax required (any unordered or ordered list supported) - [x] this is a complete item - [ ] this is an incomplete item
1. 在github上选中一段文字, 然后按'r' 会自动跳转到comment, 并将之前选中的这段文字copy作为quoting
2. 输入@, 会自动的bring up a list of people or teams on a project
3. 输入:, 自动弹出表情list, :dog会是小狗...
4. 输入#, 会自动弹出list of Issue and Pull Request suggestions
本文章摘自博客园,原文发布日期:2013-08-13