Torchlight.dev — The VS Code Compatible Syntax Highlighting API.

Summary Indicators

When using the collapse annotation, Torchlight will add an ellipses ... to indicate where the collapsed code is.

This is the default behavior:

1return [
2 'heading_permalink' => [ ...
3 'html_class' => 'permalink',
4 'id_prefix' => 'user-content',
5 'insert' => 'before',
6 'title' => 'Permalink',
7 'symbol' => '#',
8 ],
9 
10 'extensions' => [
11 // Add attributes straight from markdown.
12 AttributesExtension::class,
13 
14 // Add Torchlight syntax highlighting.
15 TorchlightExtension::class,
16 ]
17]

If you'd like to change the ... to something else, you can do so by changing the summaryCollapsedIndicator option:

1// torchlight! {"summaryCollapsedIndicator": "Click to Show"}
2return [
3 'heading_permalink' => [ // [tl! collapse:start]
4 'html_class' => 'permalink',
5 'id_prefix' => 'user-content',
6 'insert' => 'before',
7 'title' => 'Permalink',
8 'symbol' => '#',
9 ], // [tl! collapse:end]
10
11 'extensions' => [
12 // Add attributes straight from markdown.
13 AttributesExtension::class,
14
15 // Add Torchlight syntax highlighting.
16 TorchlightExtension::class,
17 ]
18]
1return [
2 'heading_permalink' => [ Click to Show
3 'html_class' => 'permalink',
4 'id_prefix' => 'user-content',
5 'insert' => 'before',
6 'title' => 'Permalink',
7 'symbol' => '#',
8 ],
9 
10 'extensions' => [
11 // Add attributes straight from markdown.
12 AttributesExtension::class,
13 
14 // Add Torchlight syntax highlighting.
15 TorchlightExtension::class,
16 ]
17]
A Hammerstone, LLC Product.
Built with Love & Care by Aaron in Dallas, Texas.