一级标题
二级标题
三级标题
四级标题
五级标题
六级标题
Markdown 标记区块引用和 email 中用 『>』的引用方式类似,只需要在整个段落的第一行最前面加上 『>』 :
这是第一级引用。
这是第二级引用。
现在回到第一级引用。
这是一个标题。
这是第一行列表项。
这是第二行列表项。
给出一些例子代码:
return shell_exec(echo $input | $markdown_script);
Red
Green
Blue
Red
Green
Blue
[ ] 不勾选
[x] 勾选
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
斜体:
Coding,让开发更简单 Coding,让开发更简单
加粗:
Coding,让开发更简单 Coding,让开发更简单
自动链接
表格 在 Markdown 中,可以制作表格,例如:
First Header
Second Header
Third Header
Content Cell
Content Cell
Content Cell
Content Cell
Content Cell
Content Cell
或者也可以让表格两边内容对齐,中间内容居中,例如:
First Header
Second Header
Third Header
Left
Center
Right
Left
Center
Right
分割线 在 Markdown 中,可以使用 3 个以上『-』符号制作分割线,例如:
这是分隔线上部分内容
这是分隔线上部分内容
内联图片语法如下:
或
引用图片语法如下:
『id』 是图片引用的名称. 图片引用使用链接定义的相同语法:
流程图 Markdown 编辑器已支持绘制流程图、时序图和甘特图。通过 mermaid 实现图形的插入,点击查看 更多语法详情。
graph TD;
A-->B;
A-->C;
B-->D;
C-->E;
E-->F;
D-->F;
F-->G;
时序图
sequenceDiagram
participant Alice
participant Bob
Alice->John: Hello John, how are you?
loop Healthcheck
John->John: Fight against hypochondria
end
Note right of John: Rational thoughts
prevail...
John-->Alice: Great!
John->Bob: How about you?
Bob-->John: Jolly good!
甘特图
gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d