Skip to content

Commit

Permalink
Fixing using specials chars in custom title. Refs tomaz#237
Browse files Browse the repository at this point in the history
  • Loading branch information
kenji21 committed Aug 13, 2012
1 parent beee592 commit d0800f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Application/GBCommentComponentsProvider.m
Expand Up @@ -99,8 +99,7 @@ - (NSString *)remoteMemberCrossReferenceRegex:(BOOL)templated {
if (templated) {
GBRETURN_ON_DEMAND([self crossReferenceRegexForRegex:[self remoteMemberCrossReferenceRegex:NO]]);
} else {
//GBRETURN_ON_DEMAND(@"([+-]?)\\[([^]\\s]+)\\s+(\\S+)\\]");
GBRETURN_ON_DEMAND(@"\\[?([\\w\\s]*)\\]?\\(?[+-]?\\[([^]\\s]+)\\s+(\\S+)\\]\\)?");
GBRETURN_ON_DEMAND(@"\\[?([^\\]]*)\\]?\\(?[+-]?\\[([^]\\s]+)\\s+(\\S+)\\]\\)?");
}
}

Expand Down
2 changes: 2 additions & 0 deletions Testing/GBCommentsProcessor-PreprocessingTesting.m
Expand Up @@ -610,11 +610,13 @@ - (void)testStringByConvertingCrossReferencesInString_shouldKeepManualObjectMeth
NSString *result2 = [processor stringByConvertingCrossReferencesInString:@"[text]([Class doSomething:withVars:])" withFlags:0];
NSString *result3 = [processor stringByConvertingCrossReferencesInString:@"[text](-[Class value])" withFlags:0];
NSString *result4 = [processor stringByConvertingCrossReferencesInString:@"[text with space](+[Class method])" withFlags:0];
NSString *result5 = [processor stringByConvertingCrossReferencesInString:@"[doSomething:withVars:]([Class doSomething:withVars:])" withFlags:0];

assertThat(result1, is(@"[text](Classes/Class.html#//api/name/method)"));
assertThat(result2, is(@"[text](Classes/Class.html#//api/name/doSomething:withVars:)"));
assertThat(result3, is(@"[text](Classes/Class.html#//api/name/value)"));
assertThat(result4, is(@"[text with space](Classes/Class.html#//api/name/method)"));
assertThat(result5, is(@"[doSomething:withVars:](Classes/Class.html#//api/name/doSomething:withVars:)"));
}

- (void)testStringByConvertingCrossReferencesInString_shouldIgnoreKnownObjectsInManualLinkDescriptionOrTitle {
Expand Down

0 comments on commit d0800f9

Please sign in to comment.