Trailing commas in JavaScript object literals are not accepted as a valid JavaScript syntax by IE7 :
var a = {
foo: 12,
bar: 13,//this is ok in all browsers except ie7
};
For the moment the way I deal with this issue is to open my website using IE7 and use the console to find the invalid js files.
Do you know how to locate (or even better remove) trailing commas in a javascript file using UNIX command line ?
I tried to grep these commas but a multiline regex is needed. I also googled the subject and found nothing useful.