Comparing version 1.3.7 to 1.3.8
{ | ||
"name": "nwmatcher", | ||
"version": "1.3.7", | ||
"version": "1.3.8", | ||
"description": "A CSS3-compliant JavaScript selector engine.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://javascript.nwbox.com/NWMatcher/", |
/* | ||
* Copyright (C) 2007-2015 Diego Perini | ||
* Copyright (C) 2007-2016 Diego Perini | ||
* All rights reserved. | ||
@@ -4,0 +4,0 @@ * |
/* | ||
* Copyright (C) 2007-2015 Diego Perini | ||
* Copyright (C) 2007-2016 Diego Perini | ||
* All rights reserved. | ||
@@ -4,0 +4,0 @@ * |
/* | ||
* Copyright (C) 2007-2015 Diego Perini | ||
* Copyright (C) 2007-2016 Diego Perini | ||
* All rights reserved. | ||
@@ -171,3 +171,3 @@ * | ||
'nwmatcher:dpseudos', | ||
/^\:(link|visited|target|active|focus|hover|checked|disabled|enabled|selected|lang\(([-\w]{2,})\)|not\(([^()]*|.*)\))?(.*)/i, | ||
/^\:(link|visited|target|active|focus|hover|checked|disabled|enabled|selected|lang\(([-\w]{2,})\)|not\(\s*(:nth(?:-last)?(?:-child|-of-type)\(\s*(?:even|odd|(?:[-+]{0,1}\d*n\s*)?[-+]{0,1}\s*\d*)\s*\)|[^()]*)\s*\))?(.*)/i, | ||
(function(global) { | ||
@@ -194,3 +194,3 @@ | ||
if (Config.SIMPLENOT && !reSimpleNot.test(expr)) { | ||
NW.Dom.emit('Negation pseudo-class only accepts simple selectors "' + match.join('') + '"'); | ||
NW.Dom.emit('Negation pseudo-class only accepts simple selectors "' + selector + '"'); | ||
} else { | ||
@@ -197,0 +197,0 @@ if ('compatMode' in doc) { |
/* | ||
* Copyright (C) 2007-2015 Diego Perini | ||
* Copyright (C) 2007-2016 Diego Perini | ||
* All rights reserved. | ||
@@ -4,0 +4,0 @@ * |
/* | ||
* Copyright (C) 2007-2015 Diego Perini | ||
* Copyright (C) 2007-2016 Diego Perini | ||
* All rights reserved. | ||
@@ -8,5 +8,5 @@ * | ||
* Author: Diego Perini <diego.perini at gmail com> | ||
* Version: 1.3.7 | ||
* Version: 1.3.8 | ||
* Created: 20070722 | ||
* Release: 20151120 | ||
* Release: 20160613 | ||
* | ||
@@ -51,3 +51,3 @@ * License: | ||
var version = 'nwmatcher-1.3.7', | ||
var version = 'nwmatcher-1.3.8', | ||
@@ -191,2 +191,3 @@ Dom = exports, | ||
INSENSITIVE_MAP = global.Object({ | ||
'class': 0, | ||
'href': 1, 'lang': 1, 'src': 1, 'style': 1, 'title': 1, | ||
@@ -459,2 +460,3 @@ 'type': 1, 'xmlns': 1, 'xml:lang': 1, 'xml:space': 1 | ||
match[4] = convertEscapes(match[4]); | ||
INSENSITIVE_MAP['class'] = QUIRKS_MODE ? 1 : 0; | ||
type = INSENSITIVE_MAP[match[1].toLowerCase()]; | ||
@@ -615,3 +617,4 @@ test = test.replace(/\%m/g, type ? match[4].toLowerCase() : match[4]); | ||
token = parts[parts.length - 1]; | ||
lastSlice = token.split(':not')[0]; | ||
lastSlice = token.split(':not'); | ||
lastSlice = lastSlice[lastSlice.length - 1]; | ||
lastPosition = selector.length - token.length; | ||
@@ -618,0 +621,0 @@ } |
/* | ||
* Copyright (C) 2007-2015 Diego Perini | ||
* Copyright (C) 2007-2016 Diego Perini | ||
* All rights reserved. | ||
@@ -8,5 +8,5 @@ * | ||
* Author: Diego Perini <diego.perini at gmail com> | ||
* Version: 1.3.7 | ||
* Version: 1.3.8 | ||
* Created: 20070722 | ||
* Release: 20151120 | ||
* Release: 20160613 | ||
* | ||
@@ -51,3 +51,3 @@ * License: | ||
var version = 'nwmatcher-1.3.7', | ||
var version = 'nwmatcher-1.3.8', | ||
@@ -175,3 +175,3 @@ Dom = exports, | ||
spseudos: /^\:(root|empty|(?:first|last|only)(?:-child|-of-type)|nth(?:-last)?(?:-child|-of-type)\(\s*(even|odd|(?:[-+]{0,1}\d*n\s*)?[-+]{0,1}\s*\d*)\s*\))?(.*)/i, | ||
dpseudos: /^\:(link|visited|target|active|focus|hover|checked|disabled|enabled|selected|lang\(([-\w]{2,})\)|not\(([^()]*|.*)\))?(.*)/i, | ||
dpseudos: /^\:(link|visited|target|active|focus|hover|checked|disabled|enabled|selected|lang\(([-\w]{2,})\)|not\(\s*(:nth(?:-last)?(?:-child|-of-type)\(\s*(?:even|odd|(?:[-+]{0,1}\d*n\s*)?[-+]{0,1}\s*\d*)\s*\)|[^()]*)\s*\))?(.*)/i, | ||
attribute: global.RegExp('^\\[' + attrmatcher + '\\](.*)'), | ||
@@ -417,4 +417,5 @@ children: /^\s*\>\s*(.*)/, | ||
INSENSITIVE_MAP = global.Object({ | ||
href: 1, lang: 1, src: 1, style: 1, title: 1, | ||
type: 1, xmlns: 1, 'xml:lang': 1, 'xml:space': 1 | ||
'class': 0, | ||
'href': 1, 'lang': 1, 'src': 1, 'style': 1, 'title': 1, | ||
'type': 1, 'xmlns': 1, 'xml:lang': 1, 'xml:space': 1 | ||
}), | ||
@@ -506,2 +507,3 @@ | ||
match[4] = convertEscapes(match[4]); | ||
INSENSITIVE_MAP['class'] = QUIRKS_MODE ? 1 : 0; | ||
type = INSENSITIVE_MAP[match[1].toLowerCase()]; | ||
@@ -596,3 +598,3 @@ test = test.replace(/\%m/g, type ? match[4].toLowerCase() : match[4]); | ||
if (Config.SIMPLENOT && !reSimpleNot.test(expr)) { | ||
emit('Negation pseudo-class only accepts simple selectors "' + match.join('') + '"'); | ||
emit('Negation pseudo-class only accepts simple selectors "' + selector + '"'); | ||
return ''; | ||
@@ -783,3 +785,4 @@ } else { | ||
token = parts[parts.length - 1]; | ||
lastSlice = token.split(':not')[0]; | ||
lastSlice = token.split(':not'); | ||
lastSlice = lastSlice[lastSlice.length - 1]; | ||
lastPosition = selector.length - token.length; | ||
@@ -786,0 +789,0 @@ } |
/* | ||
* Copyright (C) 2007-2015 Diego Perini | ||
* Copyright (C) 2007-2016 Diego Perini | ||
* All rights reserved. | ||
@@ -8,5 +8,5 @@ * | ||
* Author: Diego Perini <diego.perini at gmail com> | ||
* Version: 1.3.7 | ||
* Version: 1.3.8 | ||
* Created: 20070722 | ||
* Release: 20151120 | ||
* Release: 20160613 | ||
* | ||
@@ -55,3 +55,3 @@ * License: | ||
var version = 'nwmatcher-1.3.7', | ||
var version = 'nwmatcher-1.3.8', | ||
@@ -512,3 +512,3 @@ Dom = exports, | ||
// uistates + dynamic + negation pseudo-classes | ||
dpseudos: /^\:(link|visited|target|active|focus|hover|checked|disabled|enabled|selected|lang\(([-\w]{2,})\)|not\(([^()]*|.*)\))?(.*)/i, | ||
dpseudos: /^\:(link|visited|target|active|focus|hover|checked|disabled|enabled|selected|lang\(([-\w]{2,})\)|not\(\s*(:nth(?:-last)?(?:-child|-of-type)\(\s*(?:even|odd|(?:[-+]{0,1}\d*n\s*)?[-+]{0,1}\s*\d*)\s*\)|[^()]*)\s*\))?(.*)/i, | ||
// element attribute matcher | ||
@@ -1490,3 +1490,4 @@ attribute: new global.RegExp('^\\[' + attrmatcher + '\\](.*)'), | ||
// only last slice before :not rules | ||
lastSlice = token.split(':not')[0]; | ||
lastSlice = token.split(':not'); | ||
lastSlice = lastSlice[lastSlice.length - 1]; | ||
@@ -1493,0 +1494,0 @@ // position where token was found |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
144395
3536