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:
Richard Frith-Macdonald 2003-11-10 18:49:52 +00:00
parent a3601643a6
commit bb945efaf5
2 changed files with 21 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2003-11-10 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/AGSHtml.m: Fix based on email by Chris Vetter to correct
presentation of protocol names in index pages.
2003-11-10 David Ayers <d.ayers@inode.at>
Based on patches by Philip Moetteli <Philip.Moetteli@tele2.ch>.

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: @"&lt;"];
text = [text stringByReplacingString: @")"
withString: @"&gt;"];
}
else // Category name in brackets followed by class name
{
text = [text substringFromIndex: NSMaxRange(r)];
}
}
[buf appendString: indent];