How to escape /* in scaladoc?
Asked Answered
F

1

6

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.

Forge answered 30/5, 2014 at 17:7 Comment(0)
H
2

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...

Hydrastinine answered 26/12, 2014 at 22:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.