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.

Bug 219144 - Comments not highlighted
Summary: Comments not highlighted
Status: RESOLVED WONTFIX
Alias: None
Product: javascript
Classification: Unclassified
Component: JSON (show other bugs)
Version: 7.3
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-27 21:44 UTC by Monomachus
Modified: 2012-10-01 10:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
App.json file (1.32 KB, application/x-javascript)
2012-09-27 22:15 UTC, Monomachus
Details
App.json error badge (4.71 KB, image/png)
2012-09-27 22:19 UTC, Monomachus
Details
The correct json file (4.21 KB, application/octet-stream)
2012-09-27 22:32 UTC, Monomachus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Monomachus 2012-09-27 21:44:27 UTC
When adding the comments in a .json file not highlighted as expected.

Example:

 /**
     * The file path to this application's front HTML document, relative to this app.json file
     */
    "indexHtmlPath": "index.html",
Comment 1 Petr Hejl 2012-09-27 22:09:29 UTC
What do you mean by "not highlighted"? You mean the error badge on file? Or something else. Please always specify what you expect. That might be obvious to you but not to others. Thanks.
Comment 2 Monomachus 2012-09-27 22:15:26 UTC
Created attachment 125038 [details]
App.json file
Comment 3 Monomachus 2012-09-27 22:19:39 UTC
Created attachment 125040 [details]
App.json error badge

I've added the file to reproduce it, so basically there's an error badge as you thought, that says "expected string but found /"
Comment 4 Petr Hejl 2012-09-27 22:26:11 UTC
(In reply to comment #3)
> Created attachment 125040 [details]
> App.json error badge
> 
> I've added the file to reproduce it, so basically there's an error badge as you
> thought, that says "expected string but found /"
Well the attachment does not seem to be json file. It looks like javascript.

The message for json is correct. Comments are not allowed by json grammar.
Comment 5 Monomachus 2012-09-27 22:32:03 UTC
Created attachment 125041 [details]
The correct json file

Sorry for that. Hmm ok, this file is taken from Sencha Touch 2 app, so probably guys from ST2 were not too strict on that.
Comment 6 Petr Hejl 2012-10-01 10:00:08 UTC
I see comments only in examples not in "real" files. So I would stay with spec. BTW some time ago we had a bug reported that we are NOT marking comments in json as errors.


(In reply to comment #5)
> Created attachment 125041 [details]
> The correct json file
> 
> Sorry for that. Hmm ok, this file is taken from Sencha Touch 2 app, so probably
> guys from ST2 were not too strict on that.