Skip to content

Commit c4571a9

Browse files
committed
Fix running Darwin tests
1 parent 3ad58e4 commit c4571a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SwifterSwift/Foundation/NSAttributedStringExtensions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ public extension NSAttributedString {
109109
func applying(attributes: [Key: Any],
110110
toRangesMatching pattern: String,
111111
options: NSRegularExpression.Options = []) -> NSAttributedString {
112-
guard let pattern = try? NSRegularExpression(pattern: pattern, options: options) else { return self }
112+
guard let regularExpression = try? NSRegularExpression(pattern: pattern, options: options) else { return self }
113113

114-
let matches = pattern.matches(in: string, options: [], range: NSRange(0..<length))
114+
let matches = regularExpression.matches(in: string, options: [], range: NSRange(0..<length))
115115
let result = NSMutableAttributedString(attributedString: self)
116116

117117
for match in matches {

0 commit comments

Comments
 (0)