newToken.push(tokenize(context));
if (typeof newToken[2] == 'string')
- newToken[2] = Extract.properties(newToken[2], context);
+ newToken[2] = Extract.properties(newToken[2], [[trimmedValue]], context);
context.mode = oldMode;
context.track('}');
context.cursor = nextSpecial + 1;
context.mode = 'body';
- var body = Extract.properties(tokenize(context), context);
+ var body = Extract.properties(tokenize(context), selectors, context);
context.track('{');
context.mode = oldMode;
var COMMA = ',';
var FORWARD_SLASH = '/';
+function selectorName(value) {
+ return value[0];
+}
+
var Extractors = {
- properties: function (string, context) {
+ properties: function (string, selectors, context) {
var list = [];
var splitter = new Splitter(/[ ,\/]/);
var values = splitter.split(candidate.substring(firstColonAt + 1), true);
+ if (values.length == 1 && values[0] === '') {
+ context.outer.warnings.push('Empty property \'' + name + '\' inside \'' + selectors.filter(selectorName).join(',') + '\' selector. Ignoring.');
+ continue;
+ }
+
for (var j = 0, m = values.length; j < m; j++) {
var value = values[j];
var trimmed = value.trim();