Community
Participate
Working Groups
Build ID: M20080911-1700 Steps To Reproduce: 1. Under the formatter settings, enable javadoc comment formatting and enable formatting of html tags. 2. Add a comment like the following: /** * some comment text here * <p style="font-variant:small-caps;"> * some text to be styled a certain way * </p> */ 3. Execute the formatter and the comment should not change, however the opening <p> tag is not recognized as html and gets wrapped up to the previous line, according to the comment line length settings, as if it was normal text. More information: By removing the style="" attribute from the paragraph tag it is recognized fine and formats as expected. I just upgraded from eclipse 3.2 and this worked fine there, not sure exactly when it was broken.
That still happens using 3.5M5 and this is a regression comparing 3.3 formatter.
The formatter allows only a few tag to have attributes (currently 'table', 'tr' and 'td') although, looking at HTML 4.0.1 specifications, all may have some (e.g. id, class, lang, title, style, onclick, etc...). So, I think the best thing to do is to remove the special tags introduced while fixing bug 229107 and accept that tag name may not be always followed by the closing '>' but may have other tokens before...
Created attachment 126535 [details] Proposed patch
Created attachment 126874 [details] Better patch This patch fixes some side effects of initial patch discovered while running formatter massive tests...
Released for 3.5M6 in HEAD stream.
Verified for 3.5M6 using I20090309-0100.