diff --git a/src/index.ts b/src/index.ts index d960480..fb8aa63 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.attributeTags) + ? tagPath.map(print, "attributeTags") + : []; let textOnly = true; let textDocs = [] as Doc[];