File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ - (NSString *)stringByNumberingFormatPlaceholders
1515 static dispatch_once_t onceToken;
1616 static NSRegularExpression *matchNonEscapedPercent = nil ;
1717 dispatch_once (&onceToken, ^{
18- matchNonEscapedPercent = [NSRegularExpression regularExpressionWithPattern: @" (?<=[^%]|^)(?:(?:%% )*)(%)(?:[^%]|$)" options: 0 error: NULL ];
18+ matchNonEscapedPercent = [NSRegularExpression regularExpressionWithPattern: @" (?<=[^%]|^)(?:(?:%% )*)(%(?! \\ d+ \\ $) )(?:[^%]|$)" options: 0 error: NULL ];
1919 });
2020
2121 __block NSMutableString *tmpString = nil ;
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ NSLocalizedString(@"%@ had been successfully added to the Address Book.\nWould y
99
1010NSLocalizedString(@"foo " @"bar", @"Test multi-part quoted strings");
1111
12+ NSLocalizedString(@"Item %1$d of %2$d", @"Test positional params");
13+
1214// some regular test cases
1315
1416
You can’t perform that action at this time.
0 commit comments