Merge branch 'master' of github.com:developmentseed/mess.js
This commit is contained in:
commit
f889597358
@ -670,7 +670,7 @@ mess.Parser = function Parser(env) {
|
||||
if ((input.charAt(i) !== '.' && input.charAt(i) !== '#') ||
|
||||
peek(/^[^{]*(;|})/)) return;
|
||||
|
||||
if (match = $(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)) {
|
||||
if (match = $(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)[\s,]*\(/)) {
|
||||
name = match[1];
|
||||
|
||||
while (param = $(this.entities.variable) || $(this.entities.literal)
|
||||
|
@ -684,9 +684,17 @@ tree.Reference.validValue = function(env, selector, value) {
|
||||
return true;
|
||||
} else {
|
||||
if (tree.Reference.selector(selector).validate) {
|
||||
return tree.Reference.selector(selector).type == value.value[0].is &&
|
||||
tree.Reference._validateValue[tree.Reference.selector(selector).validate];
|
||||
(env, value.value[0].value);
|
||||
var valid = false;
|
||||
for (var i = 0; i < value.value.length; i++) {
|
||||
if (tree.Reference.selector(selector).type == value.value[i].is &&
|
||||
tree.Reference
|
||||
._validateValue
|
||||
[tree.Reference.selector(selector).validate]
|
||||
(env, value.value[i].value)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return valid;
|
||||
} else {
|
||||
return tree.Reference.selector(selector).type == value.value[0].is;
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ tree.Rule.prototype.toXML = function(env) {
|
||||
return env.error({
|
||||
message: 'Invalid value for ' +
|
||||
this.name +
|
||||
', a ' +
|
||||
tree.Reference.selector(this.name).type +
|
||||
', a valid ' +
|
||||
tree.Reference.selector(this.name).validate +
|
||||
' is expected. ' + this.value +
|
||||
' was given.',
|
||||
index: this.index
|
||||
|
Loading…
Reference in New Issue
Block a user