Closed mojavelinux closed 11 years ago
Sorry for the delay, looking over this now.
We are handling the / and @ cases, are there any others that may be of issue?
Overall, I do like this technique. We're not disallowing the use of {@literal ..}, just allowing the end user a wider variety of easier/simpler options. We definitely need to document these shortcuts.
Once again, it seems that Javadoc is extremely naive. Personally, I don't think the warning is a problem if we know that it is just a naive warning and not actually an indication that anything is going wrong.
...if you'd like to add the code used by the Pegdown doclet, that's fine with me. Really, my only concern is that we don't clobber any Javadoc. If we're sure of that, then I have no concern.
After some review of the Pegdown doclet I'm still not sure what they are trying to avoid, as I get the warning with their doclet as well. I say we remove the if (!(doc instanceof PackageDoc)) {
and process the package as normal, unless there is another issue with doing so.
Let's just remove it, then deal with any problems as they arise. That's the best way to open source :)
Rebased and merged into master. Thanks again @mojavelinux
:beers:
This patch is by no means perfect. But it serves as a preview of how we can allow verbatim source code in the Javadoc.
It appears it's possible to process and replace the raw comment text before allowing Javadoc to parse out tags. This gives us the opportunity to substitute
@
characters in front of annotation names with{@literal @}
so that the developer doesn't have to dirty up the Javadoc.Perhaps a hack. But it sure does make things nicer (see the Javadoc on Asciidoclet for an example).