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.
CSS editor does not display error when // comment is used. It actually pretends this is valid syntax (grey coloring etc.) This is source of bugs which are extremely hard to find especially when editor says "all ok".
The line comments were introduced in http://hg.netbeans.org/main-golden/rev/82b0b65079cc by Marek. I supposed it was because SCSS (and Less) are supporting them. You are right they aren't support in CSS (CSS3). I will look how to disable this for CSS, but I am surprised you are first to report this after 21 months in build. Maybe users prefer this, because browsers usually ignore lines with // since it is invalid syntax. Vlada what is your opinion about this?
I tend to agree with Petr. If you have div{ // neco2 color: red; } then browser will ignore everything up to the first semicolon. Maybe users are using toggle comment action, doing it manually correctly or they just haven't noticed it yet :)
I have implemented conditions in Lexer for comments (ignore in LESS, SCSS, throw Unexpected token Line_comment in CSS). Is this solution ok with both of you? If yes, I can push it to repository.
Ok, i checked how it was in NB 7.1 and it is quite similar after this fix. http://hg.netbeans.org/web-main/rev/c9c1405f4f7d I can revert, or change anything.
Integrated into 'main-silver', will be available in build *201504290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/c9c1405f4f7d User: Milutin Kristofic <mkristofic@netbeans.org> Log: #248984 - css editor assumes // comment is ok
Thank you, verified Product Version: NetBeans IDE Dev (Build 201504290001) Java: 1.8.0_40; Java HotSpot(TM) Client VM 25.40-b25 Runtime: Java(TM) SE Runtime Environment 1.8.0_40-b25 System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
*** Bug 258490 has been marked as a duplicate of this bug. ***