GNOME Bugzilla – Bug 680203
JavaScript: regular expressions with modifiers are not recognized
Last modified: 2015-03-04 11:06:04 UTC
gedit does not recognize Javascript regular expressions with modifiers, and thus will not properly apply syntax-highlighting. Example: The following line receives appropriate syntax highlighting: var regex = /thing[0-9]/; But this one doesn't: var regex = /thing[0-9]/g;
Which version is this about?
It looks like I'm running 3.4.1.
needs fixing in javascript.lang
Created attachment 297056 [details] [review] Fix regex modifiers in javascript.lang The only valid regex modifiers in javascript are g, i and m [1]. Changed regex modifiers from [iomx]*[neus]?[iomx]* to [gim]* [1] http://www.w3schools.com/jsref/jsref_obj_regexp.asp
Thanks for the patch Robert, I've pushed it to the master branch: https://git.gnome.org/browse/gtksourceview/commit/?id=a868a99acfcbc110266cfb09d1b87c994f4aa0c6