fix(selector): 转义字符序列化错误

This commit is contained in:
lisonge 2023-12-06 14:12:11 +08:00
parent 36bac5d765
commit 8b07fb21c1

View File

@ -19,13 +19,14 @@ data class BinaryExpression(val name: String, val operator: CompareOperator, val
'\r' -> 'r'
'\t' -> 't'
'\b' -> 'b'
'\\' -> '\\'
else -> null
}
if (escapeChar != null) {
sb.append("\\" + escapeChar)
} else {
when (c.code) {
in 0..9 -> {
in 0..0xf -> {
sb.append("\\x0" + c.code.toString(16))
}