mirror of https://github.com/Corewala/Buran
Fixed attention guide crash with long non-alphanumeric words
This commit is contained in:
parent
467e3fc0b7
commit
4a451ef5ca
|
@ -305,7 +305,7 @@ class GemtextAdapter(
|
||||||
var offset = 1
|
var offset = 1
|
||||||
|
|
||||||
if (component.length - offset > 1) {
|
if (component.length - offset > 1) {
|
||||||
while (!component.substring(offset).first().isLetterOrDigit()) {
|
while ((component.length - offset > 1) and !component.substring(offset).first().isLetterOrDigit()) {
|
||||||
offset += 1
|
offset += 1
|
||||||
}
|
}
|
||||||
val index = (component.length - offset) / 2
|
val index = (component.length - offset) / 2
|
||||||
|
|
Loading…
Reference in New Issue