From 2559fa8bae5c48aa1b275266d8b55e2aabf0cb8d Mon Sep 17 00:00:00 2001 From: Dylan Piercey Date: Tue, 8 Oct 2024 09:21:08 -0700 Subject: [PATCH] fix: support upcoming attrTags ast change (#57) --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index d960480..37087b4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -402,7 +402,9 @@ export const printers: Record> = { if (opts.markoSyntax === "html") doc.push(">"); } else if (node.body.body.length) { const lastIndex = node.body.body.length - 1; - const bodyDocs = [] as Doc[]; + const bodyDocs = Array.isArray((node as any).attributeTags) + ? (tagPath as any).map(print, "attributeTags") + : []; let textOnly = true; let textDocs = [] as Doc[];