Community
Participate
Working Groups
Build ID: 20090619-0625 Steps To Reproduce: 1. Create a multi-line comment inside some code e.g. public void foo() { /* * I do not include <pre> * xxx * xx * xxx * </pre> in this list. */ } 2. format the code with the code formatter 3. the formatter merges the lines inside the <pre> block More information:
<pre> tags are only taken into account in Javadoc comments not in multi-lines ones, hence the observed behavior... Note that there's no meaning for these tags as the Javadoc tool will never put this kind of comment in the generated doc.
I am re-opening the bug because I respectfully disagree with your line of reasoning. But if you close it again, I will respect your decision. I have changed the bug to an enhancement to better reflect our disagreement. The decision is faulty because the underlying assumption is faulty For example, I have several kLOC at my place of work. We have extensive code documentation. We use html tags all over the place. And yet we have never ever run the javadoc tool on our code. So why do we use html tags? For 2 reasons (1) it makes the formatter behave better. <p>, <pre> and <ol> tags tell the formatter how to preserve important structural information in the comment text. (2) it makes the IDE completion information that shows up more readable, since the IDE generally renders the comments in HTML mode. So when I use html tags in comments that are inside code, I was quite surprised to discover that the formatter ignores them. I can see no downside to enabling this ability, and I am willing to dig through the code and produce a patch, if such a patch would be accepted.
Agree with Frédéric.
Verified.