Comparing version 0.0.3 to 0.0.4
@@ -22,3 +22,3 @@ | ||
exports.version = '0.0.3'; | ||
exports.version = '0.0.4'; | ||
@@ -25,0 +25,0 @@ /** |
@@ -53,3 +53,3 @@ | ||
Property.prototype.toString = function () { | ||
return this.prop + ': ' + this.value + ';'; | ||
return this.prop + ': ' + this.value.replace(/['"]+/g, '') + ';'; | ||
}; |
@@ -19,3 +19,3 @@ | ||
exports.extract = function extract (selectorText) { | ||
var attr = false | ||
var attr = 0 | ||
, sels = [] | ||
@@ -28,3 +28,3 @@ , sel = '' | ||
if (attr) { | ||
if (']' == c) attr = false; | ||
if (']' == c || ')' == c) attr--; | ||
sel += c; | ||
@@ -36,3 +36,3 @@ } else { | ||
} else { | ||
if ('[' == c) attr = true; | ||
if ('[' == c || '(' == c) attr++; | ||
if (sel.length || (c != ',' && c != ' ')) sel += c; | ||
@@ -99,18 +99,2 @@ } | ||
/** | ||
* Escape the given string of `html`. | ||
* | ||
* @param {String} html | ||
* @return {String} | ||
* @api private | ||
*/ | ||
exports.escape = function escape(html){ | ||
return String(html) | ||
.replace(/&(?!\w+;)/g, '&') | ||
.replace(/</g, '<') | ||
.replace(/>/g, '>') | ||
.replace(/"/g, '"'); | ||
}; | ||
/** | ||
* Compares two specificity vectors, returning the winning one. | ||
@@ -117,0 +101,0 @@ * |
{ | ||
"name": "juice" | ||
, "version": "0.0.3" | ||
, "version": "0.0.4" | ||
, "description": "Inlines css into html source" | ||
@@ -5,0 +5,0 @@ , "contributors": [ |
8306
283