Relax handling of .ovpn whitespaces

This commit is contained in:
Davide De Rosa 2021-07-17 09:26:30 +02:00
parent b9d7473eae
commit a98943728f
2 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Return error in install completion handler. [#206](https://github.com/passepartoutvpn/tunnelkit/issues/206)
- Relax handling of whitespaces in configuration file.
## 3.3.2 (2021-06-26)

View File

@ -863,6 +863,7 @@ private extension String {
func trimmedLines() -> [String] {
return components(separatedBy: .newlines).map {
$0.trimmingCharacters(in: .whitespacesAndNewlines)
.replacingOccurrences(of: "\\s", with: " ", options: .regularExpression)
}.filter {
!$0.isEmpty
}