Code copy test

· 1 min read · 64 words

Verifies that fenced code blocks render with a copy button and follow light/dark mode.

A Python block:

def greet(name: str) -> str:
return f"hello, {name}"
print(greet("world"))

A shell block (expressive-code renders these in a terminal frame by default):

Terminal window
docker compose up -d
docker compose logs -f caddy

A TypeScript block with a filename, which expressive-code uses as the frame title:

src/lib/theme.ts
export function setMode(mode: 'light' | 'dark') {
document.documentElement.dataset.mode = mode;
}

← All notes