alanz/language-javascript — Issue #2: '$' character in identifier
Author: garious
Created: 2012-01-18 16:20:39+00:00
State: open

In JavaScript, the '$' character is not special and can appear in identifiers. jQuery makes extensive use of this.

For example:

~~~javascript
var img = document.createElement('img');
img.src = "mylogo.jpg";
$(img).click(function() {
alert('clicked!');
});
~~~

Language.Javascript fails to parse the '$' character.