diff options
-rw-r--r-- | src/util/html.js | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/util/html.js b/src/util/html.js index fc5d1e90..944eab78 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 = ''; |