markdown语法总结

纯粹自己写着玩儿的。。。记性不好,怕以后忘了

随时不断补充……………………………………..

用\转义

1
1986\. What a great season.

\1986. What a great season.

直接 1986. 会被Markdown认为是列表

代码样式(直接tab或者4个空格)

1
2
3
4
int main(){
printf("Hello,World\n");
return 0;
}

行内代码直接用反撇号``包起来,如:

Use the printf() function.

效果:Use the printf() function.

链接标题

1
This is [an example](http://example.com/ "Title") inline link.

This is an example inline link.

参考式链接

1
2
3
4
5
6
I get 10 times more traffic from [Google] [1] than from
[Yahoo] [2] or [MSN] [3].
[1]: http://google.com/ "Google"
[2]: http://search.yahoo.com/ "Yahoo Search"
[3]: http://search.msn.com/ "MSN Search"

I get 10 times more traffic from Google than from
Yahoo or MSN.

1
2
[Google][] 省略的写法
[Google]: https://www.google.com.hk/

Google

如果链接文字跟链接相同,还可以这样:

1
<http://example.com/>

效果: http://example.com/