code example in a javadoc comment
javadoc
Solution
Javadoc comments use html, so encode the / as an entity: `/`
/**
*
* /*
* *
* */ <-- right here
*
*/
Telling everyone not to put that kind of comment in their code examples might be easier.
Problem
I have multiple programmers contributing examples for javadocs and some examples contain comments formatted with ``` /* * */ ``` When I put these examples into a javadoc comment, the comment close in the example closes the javadoc comment. ``` /** * * /* * * * */ <-- right here * */ ``` Is there a proper way to handle this without telling everyone that they cannot write comments in this format?