1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-03-25 06:50:09 +08:00
This commit is contained in:
caihongming 2020-07-11 21:16:30 +08:00 committed by Him188
parent 87eb212ab2
commit 1d0c3c2e3c

View File

@ -53,6 +53,9 @@ internal inline fun String.forEachMiraiCode(crossinline block: (origin: String,
block(result.value, result.groups[3]!!.value, "")
} else block(result.value, result.groups[1]!!.value, result.groups[2]?.value ?: "")
}
if (lastIndex != this.length) {
block(substring(lastIndex, this.length), null, "")
}
}
internal object MiraiCodeParsers : Map<String, MiraiCodeParser> by mapOf(