Skip to content

Commit 0021fda

Browse files
committed
docs: update doc for "Import Code Snippets" (close: #581)
1 parent 3e4a73d commit 0021fda

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

docs/guide/markdown.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,19 @@ module.exports = {
272272

273273
You can import code snippets from existing files via following syntax:
274274

275-
**Input**
275+
``` md
276+
<<< @/filepath
277+
```
278+
279+
It also supports [line highlighting](#line-highlighting-in-code-blocks):
276280

281+
``` md
282+
<<< @/filepath{highlightLines}
277283
```
284+
285+
**Input**
286+
287+
``` md
278288
<<< @/test/markdown/fragments/snippet.js{2}
279289
```
280290

docs/zh/guide/markdown.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,16 @@ module.exports = {
270270

271271
你可以通过下述的语法导入已经存在的文件中的代码段:
272272

273+
``` md
274+
<<< @/filepath
275+
```
276+
277+
它也支持 [行高亮](#代码块中的行高亮)
278+
279+
``` md
280+
<<< @/filepath{highlightLines}
281+
```
282+
273283
**Input**
274284

275285
```

0 commit comments

Comments
 (0)