Bug 83697 [misc] Inline tags are not rendered when in the content of a block tag
Version: 3.1.0 Build id: I20050125-0800 The javadoc manual states that is possible to use inline tags (eg {@link}) in the content of block tags (such as @param). This simple case renders as "foo {@link String bar}" when it should be "foo bar": /** * @param foo {@link String bar} */ public void fred(String foo){}
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDoc2HTMLTextReader.java
int c= nextChar();
		boolean tagStarterRead= (c == '@');  
		while (c != -1) {
			buffer.append((char) c);
			int endingTagIndex= tagStarterRead ? findEndingTag(buffer) : -1;
			if (endingTagIndex != -1) {
				unread(TAGS[endingTagIndex], buffer);
				return nextChar();
			}	
			c= nextChar();
			tagStarterRead= tagStarterRead || (c == '@');
		}
		return c;
	}
	
	private void unread(String tag, StringBuffer buffer) throws IOException {
		PushbackReader reader= ((PushbackReader) getReader());
		char[] chars= tag.toCharArray();
		for (int i= chars.length -1; i >= 0; i--)
			reader.unread(chars[i]);
		buffer.setLength(buffer.length() - chars.length);
	}
	
	private int findEndingTag(StringBuffer buffer) {
		String s= buffer.toString();
		for (int  i= 0; i < TAGS.length; i++) {
			if (s.endsWith(TAGS[i]))
				return i;			
		}
		return -1;