From e8357210071b8b9e02ebfc1dd079d292d504c8bf Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 24 Sep 2024 11:34:06 -0400 Subject: [PATCH] unused --- packages/svelte/src/compiler/migrate/index.js | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/packages/svelte/src/compiler/migrate/index.js b/packages/svelte/src/compiler/migrate/index.js index 3b8c764b3f..390951fa33 100644 --- a/packages/svelte/src/compiler/migrate/index.js +++ b/packages/svelte/src/compiler/migrate/index.js @@ -794,8 +794,6 @@ function handle_events(element, state) { } if (first) { - const indent = get_indent(state, first, element); - let singular = handlers.map((handler) => handler.handler).join(', '); if (singular) { @@ -813,24 +811,6 @@ function handle_events(element, state) { } } -/** - * Returns the next indentation level of the first node that has all-whitespace before it - * @param {State} state - * @param {Array<{start: number; end: number}>} nodes - */ -function get_indent(state, ...nodes) { - for (const node of nodes) { - const line_start = state.str.original.lastIndexOf('\n', node.start); - const indent = state.str.original.substring(line_start + 1, node.start); - - if (indent.trim() === '') { - return indent; - } - } - - return ''; -} - /** * Returns start and end of the node. If the start is preceeded with white-space-only before a line break, * the start will be the start of the line.