This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 153273 [details] Red highlight of the unclosed br tag. Product Version: NetBeans IDE Dev (Build 201504150001) Updates: Updates available Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18 System: Windows 7 version 6.1 running on amd64; UTF-8; pl_PL (nb) I see no valid way to use <br> tag in JavaDoc if I don't want to have any warnings or errors. Let's see the following 3 options: public enum Sample { /** * Number 1. * <br>The first</br> */ ONE, /** * Number 2.<br/> * The second */ TWO, /** * Number 3.<br> * The third */ THREE } 1. This one gives a warning in NetBeans and the error from JavaDoc: C:\Temp\00netbeans\Testing\src\org\cezariusz\testing\EnumCodeCompletion.java:18: error: invalid end tag: </br> * <br>The first</br> 2. The second one gives NO WARNING in NetBeans (!), but the error from JavaDoc: C:\Temp\00netbeans\Testing\src\org\cezariusz\testing\EnumCodeCompletion.java:22: error: self-closing element not allowed * Number 2.<br/> 3. The third one gives no warning in NetBeans, no error from JavaDoc, but the editor highlights it in red and unclosed. Since we cannot change how JavaDoc works, the only solution I see is to add to NetBeans editor special handling of tags, which are always unclosed.
1. was already working correctly 2. should be fixed by jet-main#734ac9bffde3 3. reassigning to java/editor to evaluate
Integrated into 'main-silver', will be available in build *201504280001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/734ac9bffde3 User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Log: #251946 - Give warning for self-closing element
Works correctly in dev build - closing as fixed.
(In reply to Dusan Balek from comment #3) > Works correctly in dev build - closing as fixed. Could you please be more specific? Point 3 doesn't work correctly in 201504270341, which is currently the latest one available for download.
Will be available in build *201504280001* on http://bits.netbeans.org/dev/nightly/
(In reply to Ralph Ruijs from comment #1) > 3. reassigning to java/editor to evaluate Again, point 3. is not fixed even in 201504280001. Let me start over. "br" is a void element, which must not be closed nor self-closed: http://www.w3.org/TR/html-markup/syntax.html#syntax-elements http://www.456bereastreet.com/archive/201005/void_empty_elements_and_self-closing_start_tags_in_html/ When I use such unclosed element the editor wrongly highlights it in red, suggesting that I should do something with it. Unclosed void elements, which are allowed in JavaDoc, should be highlighted in yellow, as they are perfectly valid. That includes the following elements: <br>, <hr>, <img>, <link>, <meta>.
Created attachment 153435 [details] With 201504280001 <br> is still in red
I see - caret has to be on '<br>' tag to be displayed in red. Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/6ccbe90d1684
Integrated into 'main-silver', will be available in build *201504300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/6ccbe90d1684 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #251946: No proper way to use line break tag - fixed.
Verified both fixes with 201505020001.