From d40e3b561e6354cd329a43d871ec73cd6526cee4 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 12 Jun 2024 13:05:50 -0300 Subject: html: isBlank: handle onlyIfSIblings template content --- src/util/html.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/util/html.js') diff --git a/src/util/html.js b/src/util/html.js index 6e892031..594966ed 100644 --- a/src/util/html.js +++ b/src/util/html.js @@ -217,9 +217,17 @@ 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) { - if (!template.blank) { - return false; + const content = template.content; + + if (content instanceof Tag && content.onlyIfSiblings) { + continue; + } + + if (isBlank(content)) { + continue; } + + return false; } // If none of the templates included content either, -- cgit 1.3.0-6-gf8a5