« get me outta code hell

html: tags: allow passing attributes to tags() - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-16 15:16:26 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-16 15:16:26 -0300
commit32bfbeab829aad7ec2286f56bad7cd26690e9978 (patch)
tree263f1cf17cc1adc959e32bbfacd85ffb9d57f7f6 /src
parent24c1e7d336bf01f29f8ea73638594ce407e32c21 (diff)
html: tags: allow passing attributes to tags()
This is to control e.g. joinChildren.
Diffstat (limited to 'src')
-rw-r--r--src/util/html.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/html.js b/src/util/html.js
index f1511d9..19a7d12 100644
--- a/src/util/html.js
+++ b/src/util/html.js
@@ -177,8 +177,8 @@ export function tag(tagName, ...args) {
   return new Tag(tagName, attributes, content);
 }
 
-export function tags(content) {
-  return new Tag(null, null, content);
+export function tags(content, attributes = null) {
+  return new Tag(null, attributes, content);
 }
 
 export class Tag {