var selectorAsString = stringifySelectors(token[1]);
var isComplexAndNotSpecial = token[1].length > 1 && !isSpecial(options, selectorAsString);
+ var wrappedSelectors = options.sourceMap ? wrappedSelectorsFrom(token[1]) : token[1];
var selectors = isComplexAndNotSpecial ?
- [selectorAsString].concat(token[1]) :
+ [selectorAsString].concat(wrappedSelectors) :
[selectorAsString];
for (var j = 0, m = selectors.length; j < m; j++) {
candidates[selector].push({
where: i,
- list: token[1],
+ list: wrappedSelectors,
isPartial: isComplexAndNotSpecial && j > 0,
isComplex: isComplexAndNotSpecial && j === 0
});
reduceComplexNonAdjacentCases(tokens, candidates, options, validator);
}
+function wrappedSelectorsFrom(list) {
+ var wrapped = [];
+
+ for (var i = 0; i < list.length; i++) {
+ wrapped.push([list[i][0]]);
+ }
+
+ return wrapped;
+}
+
function reduceSimpleNonAdjacentCases(tokens, repeated, candidates, options, validator) {
function filterOut(idx, bodies) {
return data[idx].isPartial && bodies.length === 0;