mirror of
https://github.com/mamoe/mirai.git
synced 2024-12-31 07:29:45 +08:00
Fix parseMiraiCode
This commit is contained in:
parent
4c9532bad6
commit
a379ceb3b0
@ -52,7 +52,7 @@ private inline fun String.forEachMiraiCode(crossinline block: (origin: String, n
|
||||
for (result in codeRegex.findAll(this)) {
|
||||
if (result.range.first != lastIndex) {
|
||||
// skipped string
|
||||
block(result.value, null, substring(lastIndex, result.range.first))
|
||||
block(substring(lastIndex, result.range.first), null, "")
|
||||
}
|
||||
|
||||
lastIndex = result.range.last + 1
|
||||
|
Loading…
Reference in New Issue
Block a user