Hacker News new | past | comments | ask | show | jobs | submit login

Javadocs are not HTML, it's just a small subset of HTML that's actually supported.



From the JavaDoc docs[0] under the heading “Write comments in HTML”:

> The text must be written in HTML with HTML entities and HTML tags. You can use whichever version of HTML your browser supports.

0 - https://docs.oracle.com/javase/8/docs/technotes/tools/window...


Ok, I admit I probably read this a long time ago and didn't bother to ever check as I never see anything very advanced in HTML used in Javadocs...

But if you're going to link to the docs, at least link to the modern Java Documentation, not some ancient Java 8 version of the javadoc tool:

https://www.oracle.com/technical-resources/articles/java/jav...


That was the first Oracle link that appeared in search results for me. I think it’s probably more relevant to go backwards however. Javadoc 1.2, for example, has the same quote I originally included - https://web.archive.org/web/20010129031800/http://java.sun.c...


I think I "learned" that from StackOverflow... the top answer does say the same thing I was saying: "Javadoc permits only a subset of HTML tags."

https://stackoverflow.com/questions/16481230/allowed-html-ta...


You can put arbitrary HTML body content in javadoc. There is no specification that limits it, and the standard doclet just passes it through as-is.

This is similar to HTML in Markdown, incidentally.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: