diff --git a/mirai-serialization/src/commonMain/kotlin/net/mamoe/mirai/message/code/MiraiCode.kt b/mirai-serialization/src/commonMain/kotlin/net/mamoe/mirai/message/code/MiraiCode.kt index f7fa87a4c..202f6c461 100644 --- a/mirai-serialization/src/commonMain/kotlin/net/mamoe/mirai/message/code/MiraiCode.kt +++ b/mirai-serialization/src/commonMain/kotlin/net/mamoe/mirai/message/code/MiraiCode.kt @@ -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