Skip to content

Commit f7eb8a8

Browse files
committed
Merge pull request onevcat#125 from onevcat/fix/issue-118
Fix for unwanted comma
2 parents 2370ecd + 25ebba0 commit f7eb8a8

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

VVDocumenter-Xcode/Commenter/VVSwiftFunctionCommenter.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ -(void) parseSwiftArgumentsInputArgs:(NSString *)rawArgsCode
4848
return;
4949
}
5050

51-
NSString *removedUnwantComma = [rawArgsCode vv_stringByReplacingRegexPattern:@"([{(].*?[^\\)}],.*?[)}])" withString:@""];
51+
NSString *removedUnwantComma = [rawArgsCode vv_stringByReplacingRegexPattern:@"[{].*?[^}],.*?[)}]" withString:@""];
5252

5353
NSArray *argumentStrings = [removedUnwantComma componentsSeparatedByString:@","];
5454
for (__strong NSString *argumentString in argumentStrings) {

VVDocumenterTests/DocumenterTests/VVMethodTestsCode.plist

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,20 @@ SIAlertViewBackgroundStyleSolid,
560560
:param: key <#key description#>
561561
562562
:returns: <#return value description#>
563+
*/</string>
564+
</dict>
565+
<dict>
566+
<key>source</key>
567+
<string>func getSomething(input:String?, success: (Int) -> Void, failure: (NSHTTPURLResponse?, AnyObject?, NSError?) -> Void) {</string>
568+
<key>uniform</key>
569+
<string>func getSomething(input:String?, success:(Int)-> Void, failure:(NSHTTPURLResponse?, AnyObject?, NSError?)-> Void){</string>
570+
<key>result</key>
571+
<string>/**
572+
&lt;#Description#&gt;
573+
574+
:param: input &lt;#input description#&gt;
575+
:param: success &lt;#success description#&gt;
576+
:param: failure &lt;#failure description#&gt;
563577
*/</string>
564578
</dict>
565579
</array>

0 commit comments

Comments
 (0)