Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/embed-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ Sometimes you don't want to embed a whole file. Maybe because you need just a fe
```

In your code file you need to surround the fragment between `/// [demo]` lines (before and after the fragment).
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.
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.

Example:
Example ([\_media/example.js](/_media/example.js ':ignore')):

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

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

Expand Down