Sha256: 77b1c82220b0a4ebc46de99432145548c7eabbb67cc1725a60698ca935beb146
Contents?: true
Size: 911 Bytes
Versions: 3
Compression:
Stored size: 911 Bytes
Contents
(function (tree) { tree.Quoted = function (str, content, escaped, i) { this.escaped = escaped; this.value = content || ''; this.quote = str.charAt(0); this.index = i; }; tree.Quoted.prototype = { toCSS: function () { if (this.escaped) { return this.value; } else { return this.quote + this.value + this.quote; } }, eval: function (env) { var that = this; var value = this.value.replace(/`([^`]+)`/g, function (_, exp) { return new(tree.JavaScript)(exp, that.index, true).eval(env).value; }).replace(/@\{([\w-]+)\}/g, function (_, name) { var v = new(tree.Variable)('@' + name, that.index).eval(env); return v.value || v.toCSS(); }); return new(tree.Quoted)(this.quote + value + this.quote, value, this.escaped, this.index); } }; })(require('../tree'));
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
less-2.0.8 | lib/less/js/lib/less/tree/quoted.js |
less-2.0.8beta2 | lib/less/js/lib/less/tree/quoted.js |
less-2.0.8beta1 | lib/less/js/lib/less/tree/quoted.js |