Open GoogleCodeExporter opened 8 years ago
What happens if there is a closing curly brace in the code?
Like:
{@code obj={a:1}}
Original comment by micmath
on 31 Dec 2009 at 12:19
Even in JavaDoc, there is no } escape syntax for inline tags of which I know.
It's
not in the documentation I've read on the JavaDoc format, although
implementation may
differ I guess. I assume it cannot be used for such code snippets in the desire
fashion. I believe it would match in the first } encountered, with the
remaining }
being outside the inline tag, and thus treated as doc.
We mostly use it for {@code null}, instead of <code>null</code>, and other such
short
snippets (true, false, numeric literals, paramater names, etc). It's not an
issue
for us. For large multi-line code blocks, it makes more sense to use
<code>/<pre>
style documenting.
We're not doing the HTML escaping stuff that happens in JavaDoc either.
FYR: http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#{@code}
After I wrote the above, I google'd this up, which would seems to agree:
http://stackoverflow.com/questions/647195/how-do-you-escape-curly-braces-in-java
doc-inline-tags-such-as-the-code-tag
Original comment by ryan.gus...@gmail.com
on 31 Dec 2009 at 12:50
Original issue reported on code.google.com by
ryan.gus...@gmail.com
on 30 Dec 2009 at 5:00