From 21e92d932af5be927ac3d4f179d6e37831d6cffb Mon Sep 17 00:00:00 2001 From: chelkyl <14041823+chelkyl@users.noreply.github.com> Date: Thu, 25 Apr 2024 23:10:52 -0500 Subject: [PATCH 1/3] fix: only look for whitespace at start to calculate indent --- packages/astro-remote/lib/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/astro-remote/lib/utils.ts b/packages/astro-remote/lib/utils.ts index d72a7e5..20ff43f 100644 --- a/packages/astro-remote/lib/utils.ts +++ b/packages/astro-remote/lib/utils.ts @@ -39,8 +39,8 @@ export function createComponentProxy( } function getIndent(ln: string): string { - if (ln.trim() === ln) return ""; - return ln.slice(0, ln.length - ln.trim().length); + if (ln.trimStart() === ln) return ""; + return ln.slice(0, ln.length - ln.trimStart().length); } export function dedent(str: string): string { From 722fcab1513722ba448a87dd46f0a6bfd7faa732 Mon Sep 17 00:00:00 2001 From: chelkyl <14041823+chelkyl@users.noreply.github.com> Date: Thu, 25 Apr 2024 23:19:31 -0500 Subject: [PATCH 2/3] docs: add playground page for testing issue 27 --- packages/playground/src/pages/index.astro | 3 ++- .../playground/src/pages/test-issue27.astro | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 packages/playground/src/pages/test-issue27.astro diff --git a/packages/playground/src/pages/index.astro b/packages/playground/src/pages/index.astro index 728a4ef..dba53b1 100644 --- a/packages/playground/src/pages/index.astro +++ b/packages/playground/src/pages/index.astro @@ -14,6 +14,7 @@