|
|
|
@ -34,6 +34,12 @@ tree.Value.prototype = {
|
|
|
|
|
var v = val.toString();
|
|
|
|
|
if(val.is === "color" || val.is === 'uri' || val.is === 'string' || val.is === 'keyword') {
|
|
|
|
|
v = "'" + v + "'";
|
|
|
|
|
} else if (Array.isArray(this.value) && this.value.length > 1) {
|
|
|
|
|
// This covers something like `line-dasharray: 5, 10;`
|
|
|
|
|
// where the return _value has more than one element.
|
|
|
|
|
// Without this the generated code will look like:
|
|
|
|
|
// _value = 5, 10; which will ignore the 10.
|
|
|
|
|
v = '[' + this.value.join(',') + ']';
|
|
|
|
|
} else if (val.is === 'field') {
|
|
|
|
|
// replace [variable] by ctx['variable']
|
|
|
|
|
v = v.replace(/\[([^\]]*)\]/g, function(matched) {
|
|
|
|
|