Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to escape /* in scaladoc?

I have a comment that contains an example Java servlet configuration. It looks like:

/** Blah blah blah...
  * 
  * {{{
  *   <servlet-mapping>
  *     <servlet-name>MyAppServlet</servlet-name>
  *     <url-pattern>/app/*</url-pattern>
  *   </servlet-mapping>
  * }}}

The /* in the comment creates a nested block comment in Scala and that seems to confuse the scaladoc tool. Is there a way to escape /* in a block comment? Or another way to display that text?

Someone suggested using the entity &#47; for the slash, but entities don't work inside the {{{ }}} code block.

like image 713
Rob N Avatar asked Nov 10 '22 07:11

Rob N


1 Answers

This is all I could figure out:

/** Blah blah blah...
  * 
  * <pre>
  * &lt;servlet-mapping&gt;
  *   &lt;servlet-name&gt;MyAppServlet&lt;/servlet-name&gt;
  *   &lt;url-pattern&gt;/app&#47;*&lt;/url-pattern&gt;
  * &lt;/servlet-mapping&gt;
  * </pre>
  */

Ugly, but works...

like image 100
gzm0 Avatar answered Nov 14 '22 23:11

gzm0