Some inconsistency in syntax highlighting is noted on ADS Query Analyzer for mongo. Referring to the attached screenshot, a key 'first' is colored black whereas other key 'last' is colored red.
|
4 KB
|
11 KB
There are 2 syntax highlighting bugs here, but these are not keyword highlighting issues. Both these items deal with the fact that the editor should color code any text inside of a double quote:
1) {"first"} --> if I have a curly brace followed immediately by a double quote, the contents inside the double quote do not get highlighted. They should.
2) [ "asdf" ] --> any double quoted content inside of a bracket does not get highlighted. It should.
To fix these issues, take a look at: SQLStdSyntax.parseToken()
There are 2 syntax highlighting bugs here, but these are not keyword highlighting issues. Both these items deal with the fact that the editor should color code any text inside of a double quote:
1) {"first"} --> if I have a curly brace followed immediately by a double quote, the contents inside the double quote do not get highlighted. They should.
2) [ "asdf" ] --> any double quoted content inside of a bracket does not get highlighted. It should.
To fix these issues, take a look at: SQLStdSyntax.parseToken()
Verified on ADS 14-beta-55.
For the cases mentioned on the description and commented by Sachin, the highlighting works fine. However I noticed discrepancy in following 2 scenarios:
a) {jkjlk"jkjlk"}
b) [asdsa"jkaljfs"]
On (a), the part "jkjlk" does not get highlighted whereas on (b) "jkaljfs" does. Was expecting consistent behavior in both the cases.
Verified on ADS 14-beta-55.
For the cases mentioned on the description and commented by Sachin, the highlighting works fine. However I noticed discrepancy in following 2 scenarios:
a) {jkjlk"jkjlk"}
b) [asdsa"jkaljfs"]
On (a), the part "jkjlk" does not get highlighted whereas on (b) "jkaljfs" does. Was expecting consistent behavior in both the cases.
We have decided to only support
1) {"first"} --> if I have a curly brace followed immediately by a double quote, the contents inside the double quote do not get highlighted. They should.
but not:
2) [ "asdf" ] --> any double quoted content inside of a bracket does not get highlighted. It should.
I have re-opened this issue. Please check #10416 and #10460 for regression
We have decided to only support
1) {"first"} --> if I have a curly brace followed immediately by a double quote, the contents inside the double quote do not get highlighted. They should.
but not:
2) [ "asdf" ] --> any double quoted content inside of a bracket does not get highlighted. It should.
I have re-opened this issue. Please check #10416 and #10460 for regression
Also note that for [ {"asdf"} ], "asdf" will not be highlighted red.
Also note that for [ {"asdf"} ], "asdf" will not be highlighted red.
Verified in ADS 14.0.1-4. Tested all the combinations mentioned in the issue with the below statement:
replace into students values (
{
"_id" : 200,
"category" : "kids",
"name" : "potayu",
"parentname" : {"first" : "Raj", "last" : "Shrestha" },
"subs" : [ {"name" : "Humanities", "code" : "H101"} ],
"mavs" : [ {"asdf"} ],
"mavs_2" : ["asdf"],
"mavs_3" : {jkjlk"jkjlk"} ,
"mavs_4" : [asdsa"jkaljfs"],
}
) where _id >= 200
--1
Verified in ADS 14.0.1-4. Tested all the combinations mentioned in the issue with the below statement:
replace into students values (
{
"_id" : 200,
"category" : "kids",
"name" : "potayu",
"parentname" : {"first" : "Raj", "last" : "Shrestha" },
"subs" : [ {"name" : "Humanities", "code" : "H101"} ],
"mavs" : [ {"asdf"} ],
"mavs_2" : ["asdf"],
"mavs_3" : {jkjlk"jkjlk"} ,
"mavs_4" : [asdsa"jkaljfs"],
}
) where _id >= 200
--1
Issue #8853 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 14.0.1-4 |
No time estimate |
2 issue links |
is required by #10460
Issue #10460text is getting displayed in black, deviation in behaviour from ADS 13.0 |
relates to #10416
Issue #10416parsing column names within square brackets like [Req'd] - thinks the single quote is start of a string |