« get me outta code hell

html: standard blank() function - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-04-05 15:41:38 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-04-05 15:41:38 -0300
commit17f1220718f0e736723108042fc00cd5cb90070d (patch)
tree935e5cd02baab0ca20ae9c4e694a4874ce51f6bb /src/util
parent575fef166cfe915b743d89a2007e259c3fcb4904 (diff)
html: standard blank() function
For now this just returns an empty array, but if we need to make
changes later, it won't require editing all instances of blank
content!
Diffstat (limited to 'src/util')
-rw-r--r--src/util/html.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/html.js b/src/util/html.js
index a7b44ec6..be267003 100644
--- a/src/util/html.js
+++ b/src/util/html.js
@@ -38,6 +38,10 @@ export const joinChildren = Symbol();
 // or when there are multiple children.
 export const noEdgeWhitespace = Symbol();
 
+export function blank() {
+  return [];
+}
+
 export function tag(tagName, ...args) {
   let content;
   let attributes;
@@ -408,7 +412,7 @@ export class Template {
             : item.valueOf()));
       return new Tag(null, null, contents).valueOf();
     } else {
-      return [];
+      return blank();
     }
   }