Workaround is to edit javascript.lang for example in Ubuntu 13.04:

/usr/share/gtksourceview-2.0/language-specs/javascript.lang

Comment out the "class" keyword in the "future-words" section:
    <context id="future-words" style-ref="future-words">
      <!-- <keyword>class</keyword> -->

This issue comes up when working with jQuery, for example:
$div = $('<div>', {class:'foo'});

Same problem also occurs in gtksourceview3

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gtksourceview2 in Ubuntu.
https://bugs.launchpad.net/bugs/1257406

Title:
  gedit highlighting class in js

Status in “gtksourceview2” package in Ubuntu:
  Confirmed

Bug description:
  According to this post, the word class can be used as an object property name 
in JavaScript:
  stackoverflow.com/questions/7022397/

  But in Gedit, the class keyword is red everywhere in the document.
  That's quite annoying.

  class = "xyz"; //This is wrong, is highlighted
  foo.class = "xyz"; //This is right but is also highlighted

  Would you fix it, please?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gtksourceview2/+bug/1257406/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to