« 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
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/html.js19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/util/html.js b/src/util/html.js
index fc5d1e9..944eab7 100644
--- a/src/util/html.js
+++ b/src/util/html.js
@@ -527,17 +527,24 @@ export class Tag {
         : '\n'));
   }
 
+  #getContentJoiner() {
+    if (this.joinChildren === undefined) {
+      return '\n';
+    }
+
+    if (this.joinChildren === '') {
+      return '';
+    }
+
+    return `\n${this.joinChildren}\n`;
+  }
+
   #stringifyContent() {
     if (this.selfClosing) {
       return '';
     }
 
-    const joiner =
-      (this.joinChildren === undefined
-        ? '\n'
-     : this.joinChildren === ''
-        ? ''
-        : `\n${this.joinChildren}\n`);
+    const joiner = this.#getContentJoiner();
 
     let content = '';
     let blockwrapClosers = '';