From 09588ce5589003cc06873ce343af46428e2ebca2 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 14 Jun 2025 19:34:20 -0300 Subject: html: isBlank: Tag.normalize(template) to detect onlyIfContent --- src/html.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/html.js b/src/html.js index 49700775..3bec4269 100644 --- a/src/html.js +++ b/src/html.js @@ -223,7 +223,11 @@ export function isBlank(content) { // could include content. These need to be checked too. // Check each of the templates one at a time. for (const template of result) { - const content = template.content; + // Resolve the content all the way down to a tag - + // if it's a template that returns another template, + // that won't do, because we need to detect if its + // final content is a tag marked onlyIfSiblings. + const content = normalize(template); if (content instanceof Tag && content.onlyIfSiblings) { continue; -- cgit 1.3.0-6-gf8a5