mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Fixes #464 - Incorrect regex usage on extended grapheme clusters
This commit is contained in:
committed by
Stefan Ceriu
parent
910a8e2067
commit
8932e83929
@@ -89,7 +89,7 @@ class TestMeasurementParser {
|
||||
}
|
||||
|
||||
let string = String(data: handle.availableData, encoding: .utf8) ?? "<Non-ascii data of size\(handle.availableData.count)>\n"
|
||||
self.regex.matches(in: string, options: .reportCompletion, range: NSRange(location: 0, length: string.count)).forEach {
|
||||
self.regex.matches(in: string, options: .reportCompletion).forEach {
|
||||
if let nameIndex = Range($0.range(at: 1), in: string),
|
||||
let averageIndex = Range($0.range(at: 3), in: string) {
|
||||
let name = String(string[nameIndex])
|
||||
|
||||
Reference in New Issue
Block a user