« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateDotSwitcherTemplate.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/content/dependencies/generateDotSwitcherTemplate.js b/src/content/dependencies/generateDotSwitcherTemplate.js
index 6d350b22..745a1471 100644
--- a/src/content/dependencies/generateDotSwitcherTemplate.js
+++ b/src/content/dependencies/generateDotSwitcherTemplate.js
@@ -1,5 +1,5 @@
 export default {
-  extraDependencies: ['html', 'language'],
+  extraDependencies: ['html'],
 
   slots: {
     attributes: {
@@ -14,16 +14,20 @@ export default {
     initialOptionIndex: {type: 'number'},
   },
 
-  generate: (slots, {html, language}) =>
+  generate: (slots, {html}) =>
     html.tag('span', {class: 'dot-switcher'},
+      {[html.noEdgeWhitespace]: true},
+      {[html.joinChildren]: ''},
+
       slots.attributes,
 
-      language.formatListWithoutSeparator(
-        slots.options
-          .map((option, index) =>
-            html.tag('span',
-              index === slots.initialOptionIndex &&
-                {class: 'current'},
+      slots.options
+        .map((option, index) =>
+          html.tag('span',
+            {[html.onlyIfContent]: true},
+
+            index === slots.initialOptionIndex &&
+              {class: 'current'},
 
-              option)))),
+            option))),
 };