Skip to content

Commit 7ebd32e

Browse files
committed
Improve docs embed files code fragment
1 parent 44ec7cf commit 7ebd32e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/embed-files.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ Sometimes you don't want to embed a whole file. Maybe because you need just a fe
6565
```
6666

6767
In your code file you need to surround the fragment between `/// [demo]` lines (before and after the fragment).
68-
Alternatively you can use `### [demo]`. By default, only identifiers are omitted. To omit the entire line containing the identifier in the fragment output, you can add the `:omitFragmentLine` option.
68+
Alternatively you can use `### [demo]`. By default, only identifiers are omitted. To omit the entire line containing the identifier in the fragment output, add the `:omitFragmentLine` option. This is useful if your code fragment is e.g. HTML and you want to hide the Docsify fragment identifier from showing in your HTML source. `<!-- /// [demo] -->` in your source file and `:omitFragmentLine` will make the `-->` not show up in your Docsify code fragment section.
6969

70-
Example:
70+
Example ([\_media/example.js](/_media/example.js ':ignore')):
71+
72+
`[filename](_media/example.js ':include :type=code :fragment=demo')`
7173

7274
[filename](_media/example.js ':include :type=code :fragment=demo')
7375

0 commit comments

Comments
 (0)