From 8cc3827e7c9ea0d39ca64c79ca85b3e9899c2f0e Mon Sep 17 00:00:00 2001 From: Dang Trung Duc Date: Sat, 31 Jul 2021 13:33:48 +0700 Subject: [PATCH] Merge pull request #1 from kinhvodoi92/kinhvodoi92-fixRegexLimit update Regex.swift. Upgrade regex limit length --- CHANGELOG.md | 4 +++- Sources/Regex.swift | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c93b285..9e6efc6 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,8 +26,10 @@ ## [3.5.0](https://github.com/LeonardoCardoso/Swift-Link-Preview/releases/tag/3.5.0) #### Changed -- Update README.md [#150](https://github.com/LeonardoCardoso/SwiftLinkPreview/issues/150) +- Updated README.md [#150](https://github.com/LeonardoCardoso/SwiftLinkPreview/issues/150) - Changed by [benlmyers](https://github.com/benlmyers) +- Updated regex limit [#148](https://github.com/LeonardoCardoso/SwiftLinkPreview/issues/148) + - Changed by [kinhvodoi92](https://github.com/kinhvodoi92) ## [3.4.0](https://github.com/LeonardoCardoso/Swift-Link-Preview/releases/tag/3.4.0) diff --git a/Sources/Regex.swift b/Sources/Regex.swift index c4e08dc..843db2b 100644 --- a/Sources/Regex.swift +++ b/Sources/Regex.swift @@ -71,7 +71,7 @@ class Regex { var matches: [NSTextCheckingResult] = [] - let limit = 300000 + let limit = 1000000 if string.count > limit { string.split(by: limit).forEach {