* Adds simplified and much faster empty elements removal.
* Adds missing `@import` processing to our benchmark (run via `npm run bench`).
* Fixed issue [#157](https://github.com/GoalSmashers/clean-css/issues/157) - gets rid of `removeEmpty` option.
+* Fixed issue [#159](https://github.com/GoalSmashers/clean-css/issues/159) - escaped quotes inside content.
1.1.7 / 2013-10-28
==================
module.exports = function Free() {
var texts = new EscapeStore('CSSFREETEXT');
+ var findNonEscapedEnd = function(data, matched, start) {
+ var end = start;
+ while (true) {
+ end = data.indexOf(matched, end);
+
+ if (end > -1 && data[end - 1] == '\\') {
+ end += 1;
+ continue;
+ } else {
+ break;
+ }
+ }
+
+ return end;
+ };
+
return {
// Strip content tags by replacing them by the __CSSFREETEXT__
// marker for further restoring. It's done via string scanning
if (nextStart == -1)
break;
- nextEnd = data.indexOf(matchedParenthesis, nextStart + 1);
- if (nextStart == -1 || nextEnd == -1)
+ nextEnd = findNonEscapedEnd(data, matchedParenthesis, nextStart + 1);
+ if (nextEnd == -1)
break;
var text = data.substring(nextStart, nextEnd + 1);
--- /dev/null
+.zocial.acrobat:before{content:"\00E3";color:#FB0000}
+.zocial.amazon:before{content:"a"}
+.zocial.android:before{content:"&"}
+.zocial.angellist:before{content:"\00D6"}
+.zocial.aol:before{content:"\""}
+.zocial.appnet:before{content:"\00E1"}
+.zocial.appstore:before{content:"A"}
--- /dev/null
+.zocial.acrobat:before {content: "\00E3"; color: #FB0000;}
+.zocial.amazon:before {content: "a";}
+.zocial.android:before {content: "&";}
+.zocial.angellist:before {content: "\00D6";}
+.zocial.aol:before {content: "\"";}
+.zocial.appnet:before {content: "\00E1";}
+.zocial.appstore:before {content: "A";}