Skip to content

Commit

Permalink
Merge pull request #1576 from Infomaniak/fix-wbr
Browse files Browse the repository at this point in the history
Fix wbr algorithm so it doesn't remove important whitespaces and new lines
  • Loading branch information
valentinperignon authored Nov 30, 2023
2 parents 6d2e304 + dfc1f8a commit 378b218
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class HtmlFormatter(private val html: String) {
children().forEach { parent ->
val textNodes = parent.textNodes()
for (textNode in textNodes) {
val text = textNode.text()
val text = textNode.wholeText
if (text.length <= BREAK_LIMIT) continue

parent.replaceChildWithNodes(child = textNode, breakString(text))
Expand Down

0 comments on commit 378b218

Please sign in to comment.