Community
Participate
Working Groups
Create a JavaScript Project. Download jquery (uncompressed version) from http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2.js Drag it into JavaScript project. With "Enable JavaScript semantic validation" turned off, there are still two errors marked in the source. Ignore the first one, it is reported in a separate bug. The second error on line 1659 is: String literal is not properly closed by a double-quote The string in question is a regular expression, so double-quotes are not needed. NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/, I tried to reproduce this by taking object definition alone. The error went away. Something in the jquery code above the definition causes this error to appear here. As an aside, this error also doesn't occur with the same string in the minimized jquery version.
There is some interesting parser behavior: var Expr = Sizzle.selectors = { match: { NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*('"]*)(.*?)\3|)\s*\]/ } }; Validates flawlessly. But if you add a comma after curly bracket on line 5 (like: var Expr = Sizzle.selectors = { match: { NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*('"]*)(.*?)\3|)\s*\]/ }, };) the validator will bark re: double quote.
Syntax errors go away after fix in 324416. Will be in 3.2.3 and 3.3. *** This bug has been marked as a duplicate of bug 324416 ***