This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Wrong highlight for a property name #334
Open
Description
I just updated the lastest version of language-javascript (v0.112.0) which has the following bugs. I don't know which old version I used but it hasn't these bugs. Also, I think property names should be highlighted (in JSON objects and ES6 classes), it would be a good way to avoid these bugs.
I can use a keyword as a property name in JavaScript, but language-javascript matchs it wrong
test1 = {
normal: "It's okay",
function: "'function' is just a property name, and it's valid, please don't highlight this 'function' here"
}
class test2 {
normal() {/* It's okay */}
function() {/* Again, this 'function' is just a property name, not a keyword */}
}
test3 = {
normal() {/* It's okay */},
function() {/* This 'function' is a property name, not a keyword */}
}