File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020** 输入**
2121
2222```
23- <<< ./markdown/advance/ fragments/snippet.js{2}
23+ <<< ./fragments/snippet.js{2}
2424```
2525
2626** 输出**
2727
28- <<< ./markdown/advance/ fragments/snippet.js{2}
28+ <<< ./fragments/snippet.js{2}
2929
3030
3131为了只导入对应部分的代码,你也可运用 [ VS Code region] ( https://code.visualstudio.com/docs/editor/codebasics#_folding ) 。你可以在文件路径后方的 ` # ` 紧接着提供一个自定义的区域名称(预设为 ` snippet ` )
3232
3333** 输入**
3434
3535``` md
36- <<< ./markdown/advance/ fragments/snippet-with-region.js#snippet{1}
36+ <<< ./fragments/snippet-with-region.js#snippet{1}
3737```
3838
3939** 代码文件**
4040
41- <<< ./markdown/advance/ fragments/snippet-with-region.js
41+ <<< ./fragments/snippet-with-region.js
4242
4343** 输出**
4444
45- <<< ./markdown/advance/ fragments/snippet-with-region.js#snippet{1}
45+ <<< ./fragments/snippet-with-region.js#snippet{1}
Original file line number Diff line number Diff line change 2323** 输入**
2424
2525```
26- <<< include(./markdown/advance/ fragments/snippet.js)
26+ <<< include(./fragments/snippet.js)
2727```
2828
2929** 输出**
3030
31- <<<include(./markdown/advance/ fragments/snippet.js)
31+ <<<include(./fragments/snippet.js)
3232
3333
3434为了只导入对应部分的代码,你也可运用 [ VS Code region] ( https://code.visualstudio.com/docs/editor/codebasics#_folding ) 。你可以在文件路径后方的 ` # ` 紧接着提供一个自定义的区域名称(预设为 ` snippet ` )
3535
3636** 输入**
3737
3838``` md
39- <<< include(./markdown/advance/ fragments/snippet-with-region.js#snippet)
39+ <<< include(./fragments/snippet-with-region.js#snippet)
4040```
4141
4242** 代码文件**
4343
44- <<< ./markdown/advance/ fragments/snippet-with-region.js
44+ <<< ./fragments/snippet-with-region.js
4545
4646** 输出**
4747
48- <<<include(./markdown/advance/ fragments/snippet-with-region.js#snippet)
48+ <<<include(./fragments/snippet-with-region.js#snippet)
Original file line number Diff line number Diff line change 1+ # Mermaid
2+
3+ Mermaid 可让您使用文本和代码创建图表和可视化效果。
4+
5+ ![ ] ( ./images/2021-11-01-14-23-07.png )
6+
7+ 具体使用可参考 [ Mermaid-js] ( https://mermaid-js.github.io/mermaid/#/ )
8+
9+ ## 例子
10+
11+ ### Demo1
12+
13+ ```mermaid
14+ flowchart TD
15+ A[Start] --> B{Is it?};
16+ B -->|Yes| C[OK];
17+ C --> D[Rethink];
18+ D --> B;
19+ B ---->|No| E[End];
20+ ```
21+
22+ ``` mermaid
23+ flowchart TD
24+ A[Start] --> B{Is it?};
25+ B -->|Yes| C[OK];
26+ C --> D[Rethink];
27+ D --> B;
28+ B ---->|No| E[End];
29+ ```
30+
31+ ### Demo2
32+
33+ ```mermaid
34+ journey
35+ title My working day
36+ section Go to work
37+ Make tea: 5: Me
38+ Go upstairs: 3: Me
39+ Do work: 1: Me, Cat
40+ section Go home
41+ Go downstairs: 5: Me
42+ Sit down: 5: Me
43+ ```
44+
45+ ``` mermaid
46+ journey
47+ title My working day
48+ section Go to work
49+ Make tea: 5: Me
50+ Go upstairs: 3: Me
51+ Do work: 1: Me, Cat
52+ section Go home
53+ Go downstairs: 5: Me
54+ Sit down: 5: Me
55+ ```
56+
You can’t perform that action at this time.
0 commit comments