File tree Expand file tree Collapse file tree
OCCategory/NSString+VVTextGetter
VVDocumenterTests/DocumenterTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ - (NSString *)document {
4646 NSTextCheckingResult *enumDefineResult = [enumDefineExpression firstMatchInString: self .code options: 0 range: NSMakeRange (0 , self .code.length)];
4747
4848 finalString = [finalString stringByAppendingString: [self .code substringWithRange: [enumDefineResult rangeAtIndex: 0 ]]];
49- finalString = [finalString stringByAppendingString: @" \n " ];
49+ finalString = [finalString substringToIndex: finalString.length - 1 ];
50+ finalString = [finalString stringByAppendingString: @" {\n " ];
5051
5152 NSString *endPattern = @" \\ }\\ s*;" ;
5253 NSString *enumPartsString = [[self .code vv_stringByReplacingRegexPattern: enumDefinePattern withString: @" " ]
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ -(VVTextResult *) vv_textResultUntilNextString:(NSString *)findString currentLoc
115115 NSString *line = nil ;
116116 if (nextLineRange.location != NSNotFound && rangeToString.location != NSNotFound && nextLineRange.location <= rangeToString.location ) {
117117 NSRange lineRange = NSMakeRange (nextLineRange.location + 1 , rangeToString.location - nextLineRange.location );
118- if (lineRange.location < [self length ] && NSMaxRange (lineRange) < [self length ]) {
118+ if (lineRange.location < [self length ] && NSMaxRange (lineRange) <= [self length ]) {
119119 line = [self substringWithRange: lineRange];
120120 return [[VVTextResult alloc ] initWithRange: lineRange string: line];
121121 } else {
Original file line number Diff line number Diff line change 355355 <string >/**
356356 * < #Description#>
357357 */
358- typedef NS_ENUM(NSInteger, SIAlertViewBackgroundStyle){
358+ typedef NS_ENUM(NSInteger, SIAlertViewBackgroundStyle) {
359359/**
360360 * < #Description#>
361361 */
You can’t perform that action at this time.
0 commit comments