diff options
Diffstat (limited to 'src/util/html.js')
-rw-r--r-- | src/util/html.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util/html.js b/src/util/html.js index 08d03bc7..df7fa8c4 100644 --- a/src/util/html.js +++ b/src/util/html.js @@ -477,8 +477,10 @@ export class Tag { // Blockwraps only apply if they actually contain some content whose // words should be kept together, so it's okay to put them beneath the - // itemContent check. - if (item instanceof Tag && item.blockwrap) { + // itemContent check. They also never apply at the very start of content, + // because at that point there aren't any preceding words from which the + // blockwrap would differentiate its content. + if (item instanceof Tag && item.blockwrap && content) { content += `<span class="blockwrap">`; blockwrapClosers += `</span>`; } |