Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-12-15 00:08:44 +04:00
parent 471994bbc7
commit 7849157a16
15 changed files with 280 additions and 92 deletions

View File

@@ -309,7 +309,7 @@ public func addLocallyGeneratedEntities(_ text: String, enabledTypes: EnabledEnt
}
}
if hasDigits {
if hasDigits || hasColons {
if let phoneNumberDetector = phoneNumberDetector, detectPhoneNumbers {
let utf16 = text.utf16
phoneNumberDetector.enumerateMatches(in: text, options: [], range: NSMakeRange(0, utf16.count), using: { result, _, _ in