From bbc376d61f9cb0de04747685c53614544073d6af Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Mon, 28 Oct 2024 13:23:21 +0100 Subject: [PATCH] simplify --- WebDriverAgentMac/WebDriverAgentLib/Utilities/FBXPath.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/WebDriverAgentMac/WebDriverAgentLib/Utilities/FBXPath.m b/WebDriverAgentMac/WebDriverAgentLib/Utilities/FBXPath.m index e2e0990..24c1e96 100644 --- a/WebDriverAgentMac/WebDriverAgentLib/Utilities/FBXPath.m +++ b/WebDriverAgentMac/WebDriverAgentLib/Utilities/FBXPath.m @@ -110,11 +110,10 @@ - (NSString *)fb_toFixedXPathQuery NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:replacePattern options:NSRegularExpressionCaseInsensitive error:nil]; - NSString *result = [regex stringByReplacingMatchesInString:self + return [regex stringByReplacingMatchesInString:self options:0 range:NSMakeRange(0, [self length]) withTemplate:@"$1.$2"]; - return result; } @end