diff --git a/src/__tests__/__snapshots__/params-destructured.expected/auto.marko b/src/__tests__/__snapshots__/params-destructured.expected/auto.marko
new file mode 100644
index 0000000..ef39caf
--- /dev/null
+++ b/src/__tests__/__snapshots__/params-destructured.expected/auto.marko
@@ -0,0 +1,11 @@
+
+
+ <@then|{ value, done }|>
+
+ @then>
+
+
diff --git a/src/__tests__/__snapshots__/params-destructured.expected/concise.marko b/src/__tests__/__snapshots__/params-destructured.expected/concise.marko
new file mode 100644
index 0000000..adb475e
--- /dev/null
+++ b/src/__tests__/__snapshots__/params-destructured.expected/concise.marko
@@ -0,0 +1,10 @@
+macro name="recursive"
+ await(generator.next())
+ @then|{ value, done }|
+ div
+ ul
+ li -- ${value}
+ ul
+ li -- ${value}
+ ul
+ li -- ${value}
diff --git a/src/__tests__/__snapshots__/params-destructured.expected/html.marko b/src/__tests__/__snapshots__/params-destructured.expected/html.marko
new file mode 100644
index 0000000..ef39caf
--- /dev/null
+++ b/src/__tests__/__snapshots__/params-destructured.expected/html.marko
@@ -0,0 +1,11 @@
+
+
+ <@then|{ value, done }|>
+
+ @then>
+
+
diff --git a/src/__tests__/__snapshots__/params-destructured.expected/with-parens.marko b/src/__tests__/__snapshots__/params-destructured.expected/with-parens.marko
new file mode 100644
index 0000000..ef39caf
--- /dev/null
+++ b/src/__tests__/__snapshots__/params-destructured.expected/with-parens.marko
@@ -0,0 +1,11 @@
+
+
+ <@then|{ value, done }|>
+
+ @then>
+
+
diff --git a/src/__tests__/fixtures/params-destructured.marko b/src/__tests__/fixtures/params-destructured.marko
new file mode 100644
index 0000000..ef39caf
--- /dev/null
+++ b/src/__tests__/fixtures/params-destructured.marko
@@ -0,0 +1,11 @@
+
+
+ <@then|{ value, done }|>
+
+ @then>
+
+
diff --git a/src/index.ts b/src/index.ts
index 3760092..f8a642a 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -600,8 +600,11 @@ export const printers: Record> = {
"__js_expression",
(doc: any) => {
const { contents } = doc.contents[0];
- if (Array.isArray(contents) && contents[0] === "(") {
- return contents.slice(1, -1);
+ if (Array.isArray(contents) && contents[0].startsWith("(")) {
+ contents[0] = contents[0].slice(1);
+ contents[contents.length - 1] = contents[
+ contents.length - 1
+ ].slice(0, -1);
}
return contents;