Not so much an answer as a workaround, but if you replace {@code ...}
with the old version <code>...</code>
it will render curly braces how you expect.
<code>{person} == ${person}</code>
Unfortunately, this breaks angle brackets, so to the original question you need to escape these:
<code><custom:meatball color="<%= Meatball.RED %> nincompoop="${person}" /></code>
You can even cheat here by getting Notepad++ to do that for you, with the handy TextFX -> convert -> Encode HTML (&<>").
This does at least have the benefit that everything renders nicely both in the generated Javadoc and in Eclipse in the Javadoc view, which doesn't appear to understand }
and friends.
Try using HTML escapes:
${person} == ${person}
bodunbodun solution works as it usually happens that you have newline as well in the javadocs. HTML escapes won't work if you want both { and newline
<pre>
{@code
<foo bar="}${bar}{@code"/>
<bar foo="}${foo}{@code"/>
}
</pre>
will give you
<foo bar="${bar}" />
<bar foo="${foo}" />
I had the same problem actually - none of propositions have worked for me (HTML escapes do not work for whatever reason). If that helps - try closing the {@code} before problematic symbol and reopen it after, like this:
{@code nincompoop="}${person}{@code" />}
This doesn't seem the solution, but it works, and does not break formatting if used carefully :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With