搜索
您的当前位置:首页正文

Markdown常见用法(掌握这些,日常使用是够的)

来源:哗拓教育

效果见图:


山寨版:

主标题

主标题
=

次标题

次标题
-

目录
[TOC]

[TOC]

h1

h2

h3

h4

h5
h6
#h1
##h2
###h3
####h4
#####h5
######h6
    • 1
      • 1-1
    • 2
    • 3
* 一
  * 1
    * 1-1
  * 2
  * 3
* 二
* 三
* 四
1. 一
2. 二
3. 三
4. 四

嵌套1

嵌套2

嵌套3

嵌套4

还嵌套啊

> 嵌套1
> > 嵌套2
> > > 嵌套3
> > > > 嵌套4
> > > > > 还嵌套啊
引用[KylinKing][1]  有一个简历[resume][2]

[1]: https://ycjcl.cc/        "Kylin"
[2]: http://resume.ycjcl.cc  "resume"

代码:

# -- coding:utf-8 --
import requests as req
import pyquery as query
import sys
reload(sys)
sys.setdefaultencoding('utf-8')

res = 
con = query.PyQuery(res)
a =  con('.card a')

subaddr = []

for href in a.items():
    addr = str(href.attr('href'))
    if len(addr) > 30:
        if addr.find('http') == -1:
            addr = 'http://ycjcl.cc'+addr
        subaddr.append(addr)

# print subaddr
for sub in xrange(len(subaddr)):
    if sub%2 == 1:
        content = unicode(req.get(subaddr[sub]).content,'utf-8')
        main = query.PyQuery(content)
        title = main('.article-title').html()
        article = main('#article-detail').html()
        print title
        f = open(str(sub)+'.txt','w+')
        f.write('标题为:'+title)
        f.write('内容为:'+article)
        f.close()

表格

表头1 表头2
Content Cell Content Cell
Content Cell Content Cell
表头1 表头2
Content Cell Content Cell
Content Cell Content Cell
名字 描述
Help Display the help window.
Close Closes a window

表格中也可以使用普通文本的删除线,斜体等效果

名字 描述
Help Display the help window.
Close Closes a window

表格可以指定对齐方式

左对齐 居中 右对齐
col 3 is some wordy text $1600
col 2 is centered $12
zebra stripes are neat $1
| 表头1          | 表头2          |
| ------------ | ------------ |
| Content Cell | Content Cell |
| Content Cell | Content Cell |

| 表头1          | 表头2          |
| ------------ | ------------ |
| Content Cell | Content Cell |
| Content Cell | Content Cell |

| 名字    | 描述                       |
| ----- | ------------------------ |
| Help  | Display the help window. |
| Close | Closes a window          |

表格中也可以使用普通文本的删除线,斜体等效果

| 名字    | 描述                           |
| ----- | ---------------------------- |
| Help  | ~~Display the~~ help window. |
| Close | _Closes_ a window            |

表格可以指定对齐方式

| 左对齐           |       居中        |   右对齐 |
| :------------ | :-------------: | ----: |
| col 3 is      | some wordy text | $1600 |
| col 2 is      |    centered     |   $12 |
| zebra stripes |    are neat     |    $1 |

分割

  • eefwe
  • wefsdf
    分割

  • eefwe
  • wefsdf
    分割

  1. eefwe
  2. wefsdf

强调

Donkeys are not
Donkeys are not
coding
==强调==

Donkeys are *not*  
Donkeys are **not**  
`coding`  
==强调==
  

图片
![图片]()

消除

~~消除~~

复选框

  • [ ] Hello
  • [x] World
  • [ ] Friend
  • [x] KylinKing
* [ ] Hello
* [x] World
* [ ] Friend
* [x] KylinKing

emoji表情

​:happy:​、​:angry:​
Top