Skip to content

Commit 5fb61b3

Browse files
committed
Add clarifying comment
1 parent 05d0371 commit 5fb61b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/src/main/java/com/infomaniak/mail/utils/HtmlFormatter.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ class HtmlFormatter(private val html: String) {
9292
}
9393
}
9494

95+
// When displaying emails that have very long strings that are hard to break (mostly URLs), sometimes using
96+
// 'overflow-wrap: break-word' doesn't help softwrapping the line. This results in very wide emails that need to be zoomed out
97+
// excessively. To fix this issue, we add zero width spaces in optimal places to help this css attribute wrap correctly
9598
private fun Node.breakLongStrings() {
9699
for (child in childNodes()) {
97100
if (child is TextNode) {

0 commit comments

Comments
 (0)