Skip to content

Commit

Permalink
html: don't place blockwrap at start of content
Browse files Browse the repository at this point in the history
  • Loading branch information
towerofnix committed Dec 30, 2023
1 parent f94b520 commit 8d0762e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/util/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>`;
}
Expand Down

0 comments on commit 8d0762e

Please sign in to comment.