From 0b9f5607c61dd62bbc5f9acb9d850d67c105feb7 Mon Sep 17 00:00:00 2001 From: ComputerGuy <63362464+Ocean-OS@users.noreply.github.com> Date: Mon, 16 Jun 2025 21:00:40 -0700 Subject: [PATCH] `KeyBlock` --- packages/svelte/src/compiler/print/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/svelte/src/compiler/print/index.js b/packages/svelte/src/compiler/print/index.js index 771c997fdf..213fa3b1f8 100644 --- a/packages/svelte/src/compiler/print/index.js +++ b/packages/svelte/src/compiler/print/index.js @@ -16,7 +16,7 @@ export function print(ast) { }); } -/** @type {Visitors} */ +/** @type {Visitors} */ const visitors = { Root(node, context) { if (node.options) { @@ -354,6 +354,14 @@ const visitors = { } }, + KeyBlock(node, context) { + context.write('{#key '); + context.visit(node.expression); + context.write('}'); + context.visit(node.fragment); + context.write('{/key}'); + }, + LetDirective(node, context) { context.write(`let:${node.name}`); if (