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
5 changes: 5 additions & 0 deletions .changeset/toml-syntax-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cloudflare/kumo": minor
---

Add `toml` as a supported language for syntax highlighting in the Code component
3 changes: 2 additions & 1 deletion packages/kumo/src/code/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const BUNDLED_LANGS: Record<
bash: () => import("@shikijs/langs/bash"),
shell: () => import("@shikijs/langs/shellscript"),
diff: () => import("@shikijs/langs/diff"),
hcl: () => import("@shikijs/langs/hcl")
hcl: () => import("@shikijs/langs/hcl"),
toml: () => import("@shikijs/langs/toml"),
};

/**
Expand Down
1 change: 1 addition & 0 deletions packages/kumo/src/code/server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const BUNDLED_LANGS: Record<
shell: () => import("@shikijs/langs/shellscript"),
diff: () => import("@shikijs/langs/diff"),
hcl: () => import("@shikijs/langs/hcl"),
toml: () => import("@shikijs/langs/toml"),
};

export interface HighlightCodeOptions {
Expand Down
3 changes: 2 additions & 1 deletion packages/kumo/src/code/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export type SupportedLanguage =
| "bash"
| "shell"
| "diff"
| "hcl";
| "hcl"
| "toml";

/**
* Shiki engine choice for syntax highlighting.
Expand Down