Javadoc 5 introduced the {...@code} [1] tag which does not interpret HTML tags. Thus theres no need for escaping HTML entities. We can change code form this:

<pre class="prettyprint">
 &lt;context-param&gt;
   &lt;param-name&gt;config-service-class&lt;/param-name&gt;
   &lt;param-value&gt;com.corp.CustomConfigSerivce&lt;/param-value&gt;
 &lt;/context-param&gt;
</pre>

to this:

<pre class="prettyprint">
{...@code
 <context-param>
   <param-name>config-service-class</param-name>
   <param-value>com.corp.CustomConfigSerivce</param-value>
 </context-param>
}
</pre>

Its also possible to close and reopen {...@code} tags if HTML interpretation is needed:

<pre class="prettyprint">
{...@code
 <context-param>
<param-name>}<span class="red">config-service-class</font>{...@code </param-name>
   <param-value>com.corp.CustomConfigSerivce</param-value>
 </context-param>
}
</pre>

Nice!

[1]: http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.htm...@code}

Reply via email to