Skip to content

Commit

Permalink
docs: update doc for "Import Code Snippets" (close: #581)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Jun 13, 2018
1 parent 3e4a73d commit 0021fda
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/guide/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,19 @@ module.exports = {

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

**Input**
``` md
<<< @/filepath
```

It also supports [line highlighting](#line-highlighting-in-code-blocks):

``` md
<<< @/filepath{highlightLines}
```

**Input**

``` md
<<< @/test/markdown/fragments/snippet.js{2}
```

Expand Down
10 changes: 10 additions & 0 deletions docs/zh/guide/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,16 @@ module.exports = {

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

``` md
<<< @/filepath
```

它也支持 [行高亮](#代码块中的行高亮)

``` md
<<< @/filepath{highlightLines}
```

**Input**

```
Expand Down

0 comments on commit 0021fda

Please sign in to comment.