Skip to content

Commit 1e0d18b

Browse files
committed
SwiftLintBuiltInRules: treat Windows similar to Linux wrt NSDataDetector
1 parent 0afb6cc commit 1e0d18b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/SwiftLintBuiltInRules/Rules/Metrics/LineLengthRule.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private extension String {
221221
var strippingURLs: String {
222222
let range = fullNSRange
223223
// Workaround for Linux until NSDataDetector is available
224-
#if os(Linux)
224+
#if os(Linux) || os(Windows)
225225
// Regex pattern from http://daringfireball.net/2010/07/improved_regex_for_matching_urls
226226
let pattern = "(?i)\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)" +
227227
"(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*" +

0 commit comments

Comments
 (0)