Skip to content

Commit da46975

Browse files
committed
temp
1 parent f28ec78 commit da46975

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

VVDocumenter-Xcode/Commenter/VVBaseCommenter.m

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,16 @@ -(NSString *) startComment
4646
[[VVDocumenterSetting defaultSetting] briefDescription] && !self.forSwift ? @"@brief " : @"";
4747

4848
NSString *authorInfo = @"";
49+
4950
if ([[VVDocumenterSetting defaultSetting] useAuthorInformation] && !self.forSwift) {
50-
5151
authorInfo = [NSString stringWithFormat:@"%@@Author",
5252
self.prefixString];
53+
NSMutableString *authorCotent = @"".mutableCopy;
5354

5455
if ([[VVDocumenterSetting defaultSetting] authorInformation].length > 0) {
55-
authorInfo = [NSString stringWithFormat:@"%@ %@,",
56-
self.prefixString,
57-
[[VVDocumenterSetting defaultSetting] authorInformation]];
56+
[authorCotent appendString:[[VVDocumenterSetting defaultSetting] authorInformation]];
5857
}
59-
58+
6059
if ([[VVDocumenterSetting defaultSetting] useDateInformation]) {
6160
NSString *formatString = [[VVDocumenterSetting defaultSetting] dateInformationFormat];
6261
if ([formatString length] <= 0) {
@@ -65,9 +64,10 @@ -(NSString *) startComment
6564
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
6665
[formatter setDateFormat:formatString];
6766

68-
authorInfo = [NSString stringWithFormat:@"%@ %@",
69-
authorInfo,
70-
[formatter stringFromDate:[NSDate date]]];
67+
if (authorCotent.length > 0) {
68+
[authorCotent appendString:@", "];
69+
}
70+
[authorCotent appendString:[formatter stringFromDate:[NSDate date]]];
7171
}
7272
authorInfo = [NSString stringWithFormat:@"%@\n", authorInfo];
7373
}

0 commit comments

Comments
 (0)