« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util/html.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/html.js')
-rw-r--r--src/util/html.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/util/html.js b/src/util/html.js
index 9475698..a9b4bb9 100644
--- a/src/util/html.js
+++ b/src/util/html.js
@@ -1,7 +1,22 @@
 // Some really simple functions for formatting HTML content.
 
-// Non-comprehensive. ::::P
-export const selfClosingTags = ['br', 'img'];
+// COMPREHENSIVE!
+// https://html.spec.whatwg.org/multipage/syntax.html#void-elements
+export const selfClosingTags = [
+    'area',
+    'base',
+    'br',
+    'col',
+    'embed',
+    'hr',
+    'img',
+    'input',
+    'link',
+    'meta',
+    'source',
+    'track',
+    'wbr',
+];
 
 // Pass to tag() as an attri8utes key to make tag() return a 8lank string
 // if the provided content is empty. Useful for when you'll only 8e showing