Minor fix generating documentation

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18074 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2003-11-10 18:49:52 +00:00
parent 49728ca894
commit f3a7cd9816
2 changed files with 21 additions and 3 deletions

View file

@ -434,13 +434,26 @@ static NSMutableSet *textNodes = nil;
NSString *text = ref;
/*
* If a reference to a method contains a leading catergory name,
* we don't want it in the visiable method name.
* If a reference to a method contains a leading category name,
* we don't want it in the visible method name, however if it's
* actually a protocol name, we need to make it look right by
* changing the round brackets to angle brackets.
*/
if ([text hasPrefix: @"("] == YES)
{
NSRange r = [text rangeOfString: @")"];
text = [text substringFromIndex: NSMaxRange(r)];
if (NSMaxRange(r) == [text length]) // A protocol
{
text = [text stringByReplacingString: @"("
withString: @"<"];
text = [text stringByReplacingString: @")"
withString: @">"];
}
else // Category name in brackets followed by class name
{
text = [text substringFromIndex: NSMaxRange(r)];
}
}
[buf appendString: indent];