From a229a9ddee5f42e99db2d76e78b3f760dc7cc84d Mon Sep 17 00:00:00 2001 From: dpiercey Date: Fri, 13 Dec 2024 15:10:24 -0700 Subject: [PATCH] fix: format script tag value with arrow fn --- .../script-value-attribute.expected/auto.marko | 6 ++++++ .../script-value-attribute.expected/concise.marko | 7 +++++++ .../script-value-attribute.expected/html.marko | 6 ++++++ .../script-value-attribute.expected/with-parens.marko | 6 ++++++ src/__tests__/fixtures/script-value-attribute.marko | 7 +++++++ src/index.ts | 4 ++-- 6 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/__tests__/__snapshots__/script-value-attribute.expected/auto.marko b/src/__tests__/__snapshots__/script-value-attribute.expected/auto.marko index c9185eb..02d6a3e 100644 --- a/src/__tests__/__snapshots__/script-value-attribute.expected/auto.marko +++ b/src/__tests__/__snapshots__/script-value-attribute.expected/auto.marko @@ -3,3 +3,9 @@ if (test) { } + + diff --git a/src/__tests__/__snapshots__/script-value-attribute.expected/concise.marko b/src/__tests__/__snapshots__/script-value-attribute.expected/concise.marko index 2a70e86..5875255 100644 --- a/src/__tests__/__snapshots__/script-value-attribute.expected/concise.marko +++ b/src/__tests__/__snapshots__/script-value-attribute.expected/concise.marko @@ -4,3 +4,10 @@ script if (test) { } -- + +script + -- + console.log("Foo"); + if (test) { + } + -- diff --git a/src/__tests__/__snapshots__/script-value-attribute.expected/html.marko b/src/__tests__/__snapshots__/script-value-attribute.expected/html.marko index c9185eb..02d6a3e 100644 --- a/src/__tests__/__snapshots__/script-value-attribute.expected/html.marko +++ b/src/__tests__/__snapshots__/script-value-attribute.expected/html.marko @@ -3,3 +3,9 @@ if (test) { } + + diff --git a/src/__tests__/__snapshots__/script-value-attribute.expected/with-parens.marko b/src/__tests__/__snapshots__/script-value-attribute.expected/with-parens.marko index c9185eb..02d6a3e 100644 --- a/src/__tests__/__snapshots__/script-value-attribute.expected/with-parens.marko +++ b/src/__tests__/__snapshots__/script-value-attribute.expected/with-parens.marko @@ -3,3 +3,9 @@ if (test) { } + + diff --git a/src/__tests__/fixtures/script-value-attribute.marko b/src/__tests__/fixtures/script-value-attribute.marko index f9db039..d4ead1c 100644 --- a/src/__tests__/fixtures/script-value-attribute.marko +++ b/src/__tests__/fixtures/script-value-attribute.marko @@ -4,3 +4,10 @@ } }/> + +