Markdown代码高亮
行内代码高亮
依赖模块: pymdownx.inlinehilite
code
区块代码高亮
依赖模块: codehilite
写法1: 3个`
| Python |
|---|
| text = "Hello, world!"
print text
|
写法2: 4个空格+shebang
| Text Only |
|---|
| #!/usr/bin/python
text = "Hello, world!"
print text
|
指定第几行背景高亮
hl_lines="2"
| Python |
|---|
| text1 = "Hello, "
text2 = "world!"
print text1 + text2
|
指定行号从多少开始编号
linenums="2"
| Python |
|---|
| text1 = "Hello, "
text2 = "world!"
print text1 + text2
|