renamed string to quoted, to match the node

This commit is contained in:
cloudhead 2010-03-05 14:56:27 -05:00
parent cd5bddff99
commit 0af5632531

View File

@ -192,7 +192,7 @@ less.parser = {
return root;
},
entities: {
string: function () {
quoted: function () {
var str;
if (input[i] !== '"' && input[i] !== "'") return;
@ -231,13 +231,13 @@ less.parser = {
literal: function () {
return $(this.entities.dimension) ||
$(this.entities.color) ||
$(this.entities.string);
$(this.entities.quoted);
},
url: function () {
var value;
if (! $(/url\(/g)) return;
value = $(this.entities.string) || $(/[-a-zA-Z0-9_%@$\/.&=:;#+?]+/g);
value = $(this.entities.quoted) || $(/[-a-zA-Z0-9_%@$\/.&=:;#+?]+/g);
if (! $(')')) throw new(Error)("missing closing ) for url()");
return new(tree.URL)(value);
@ -367,9 +367,9 @@ less.parser = {
if (! $('[')) return;
if (key = $(/[a-z]+/g) || $(this.entities.string)) {
if (key = $(/[a-z]+/g) || $(this.entities.quoted)) {
if ((op = $(/[|~*$^]?=/g)) &&
(val = $(this.entities.string) || $(/[\w-]+/g))) {
(val = $(this.entities.quoted) || $(/[\w-]+/g))) {
attr = [key, op, val.toCSS ? val.toCSS() : val].join('');
} else { attr = key }
}