Skip to content

Commit 5d35f8b

Browse files
committed
SwiftLintBuiltInRules: treat Windows similar to Linux wrt NSDataDetector
1 parent d6b6b5b commit 5d35f8b

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
@@ -135,7 +135,7 @@ private extension String {
135135
var strippingURLs: String {
136136
let range = fullNSRange
137137
// Workaround for Linux until NSDataDetector is available
138-
#if os(Linux)
138+
#if os(Linux) || os(Windows)
139139
// Regex pattern from http://daringfireball.net/2010/07/improved_regex_for_matching_urls
140140
let pattern = "(?i)\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)" +
141141
"(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*" +

0 commit comments

Comments
 (0)