Fix crash caused by empty span when removing leading newlines
Change-Id: I9045bf1314b15d3672d1837bca29fa4af4c0fdbd
This commit is contained in:
parent
16afd70294
commit
1e3b77824e
|
@ -277,6 +277,9 @@ class EventHtmlRenderer @Inject constructor(
|
|||
|
||||
spans.forEach { span ->
|
||||
val start = text.getSpanStart(span)
|
||||
if (start < 0) {
|
||||
return@forEach
|
||||
}
|
||||
if (text[start] == '\n') {
|
||||
text.replace(start, start + 1, "")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue