Skip to content

Commit f5d9d79

Browse files
committed
fix(plugins): use 'jsonc' instead of 'json' for code block language
The Block Kit CodeBlock type and Kumo's CodeBlock component use 'jsonc' for JSON content. Both webhook-notifier and sandboxed-test were using 'json' which is not in the canonical set and would fail validation if validateBlocks() were enforced. While the blocks renderer now normalizes 'json' -> 'jsonc' as a safety net, first-party plugins should use the canonical value.
1 parent da513e7 commit f5d9d79

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/plugins/sandboxed-test/src/sandbox-entry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,7 @@ async function runSingleTestAdmin(ctx: PluginContext, testId: string) {
12591259
style: result.passed ? "success" : "error",
12601260
text: `${result.passed ? "PASS" : "FAIL"}: ${result.message}`,
12611261
},
1262-
...(result.details ? [{ type: "code", code: result.details, language: "json" }] : []),
1262+
...(result.details ? [{ type: "code", code: result.details, language: "jsonc" }] : []),
12631263
],
12641264
toast: {
12651265
message: `${testId}: ${result.passed ? "passed" : "failed"}`,

packages/plugins/webhook-notifier/src/sandbox-entry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ async function buildSettingsPage(ctx: PluginContext) {
507507
},
508508
{ type: "divider" },
509509
{ type: "section", text: "**Payload Preview**" },
510-
{ type: "code", code: payloadPreview, language: "json" },
510+
{ type: "code", code: payloadPreview, language: "jsonc" },
511511
{
512512
type: "actions",
513513
elements: [

0 commit comments

Comments
 (0)