* Fixed issue [#396](https://github.com/jakubpawlowicz/clean-css/issues/396) - better input source maps tracking.
+[3.1.4 / 2015-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v3.1.3...3.1)
+==================
+
+* Fixes issue [#478](https://github.com/jakubpawlowicz/clean-css/issues/478) - ultimate fix to brace whitespace.
+
[3.1.3 / 2015-03-03](https://github.com/jakubpawlowicz/clean-css/compare/v3.1.2...v3.1.3)
==================
}
Tokenizer.prototype.toTokens = function (data) {
- data = data
- .replace(/\r\n/g, '\n')
- .replace(/\)([^\s\{_;:,\.]|\.\d)/g, this.addSourceMap ? ') __ESCAPED_COMMENT_CLEAN_CSS(0,-1)__$1' : ') $1');
+ data = data.replace(/\r\n/g, '\n');
var chunker = new Chunker(data, '}', 128);
if (chunker.isEmpty())
var token;
var addSourceMap = context.addSourceMap;
+ if (string.replace && string.indexOf(')') > 0)
+ string = string.replace(/\)([^\s_;:,])/g, context.addSourceMap ? ') __ESCAPED_COMMENT_CLEAN_CSS(0,-1)__$1' : ') $1');
+
for (var i = 0, l = string.length; i < l; i++) {
current = string[i];
isPropertyEnd = current === ';';
'a{margin:calc(100% - 2px) calc(100% - 5px)}',
'a{margin:calc(100% - 2px)calc(100% - 5px)}'
],
- 'after :not': [
+ 'after :not #1': [
'li:not(.foo).bar{color:red}',
'li:not(.foo).bar{color:red}'
+ ],
+ 'after :not #2': [
+ 'li:not(.foo)[data-type=none]{color:red}',
+ 'li:not(.foo)[data-type=none]{color:red}'
+ ],
+ 'after :not #3': [
+ 'li:not(.foo)#id{color:red}',
+ 'li:not(.foo)#id{color:red}'
]
}),
'line breaks': cssContext({