Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions ec.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import lightTheme from "solarflare-theme/themes/cloudflare-light-color-theme.jso
import { definePlugin } from "@expressive-code/core";
import { h } from "@expressive-code/core/hast";

import { pluginCollapsibleSections } from "@expressive-code/plugin-collapsible-sections";

import lzstring from "lz-string";

/**
Expand Down Expand Up @@ -156,6 +158,7 @@ export default {
workersPlaygroundButton(),
outputCodeblocks(),
defaultLanguageTitles(),
pluginCollapsibleSections(),
],
themes: [darkTheme, lightTheme],
styleOverrides: {
Expand Down
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@cloudflare/vitest-pool-workers": "^0.5.40",
"@cloudflare/workers-types": "^4.20241218.0",
"@codingheads/sticky-header": "^1.0.2",
"@expressive-code/plugin-collapsible-sections": "^0.38.3",
"@iarna/toml": "^2.2.5",
"@iconify-json/material-symbols": "^1.2.12",
"@stoplight/json-schema-tree": "^4.0.0",
Expand Down
9 changes: 9 additions & 0 deletions src/content/docs/style-guide/components/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ This is just a small showcase of functionality, it has a lot of options!
Write-Output "This one has a title!"
```

```js collapse={3-5}
// Collapsing
const foo = {
1: 1,
2: 2,
3: 3,
};
```

```js wrap
// Example with wrap
function getLongString() {
Expand Down
Loading