+[4.1.3 / 2017-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v4.1.2...4.1)
+==================
+
+* Fixed issue [#946](https://github.com/jakubpawlowicz/clean-css/issues/946) - tokenizing `-ms-grid-columns` repeat syntax.
+
[4.1.2 / 2017-05-10](https://github.com/jakubpawlowicz/clean-css/compare/v4.1.1...v4.1.2)
==================
'@supports'
];
+var REPEAT_PATTERN = /^\[\s*\d+\s*\]$/;
var RULE_WORD_SEPARATOR_PATTERN = /[\s\(]/;
var TAIL_BROKEN_VALUE_PATTERN = /[\s|\}]*$/;
// comma within a property after space, e.g. a{background:url(image.png) ,<--
propertyToken.push([Token.PROPERTY_VALUE, character, [[position.line, position.column, position.source]]]);
+ buffer = [];
+ } else if (character == Marker.CLOSE_SQUARE_BRACKET && propertyToken && propertyToken.length > 1 && buffer.length > 0 && isRepeatToken(buffer)) {
+ buffer.push(character);
+ serializedBuffer = buffer.join('').trim();
+ propertyToken[propertyToken.length - 1][1] += serializedBuffer;
+
buffer = [];
} else if ((isSpace || (isNewLineNix && !isNewLineWin)) && level == Level.RULE && seekingValue && propertyToken && buffer.length > 0) {
// space or *nix newline within property, e.g. a{margin:0 <--
}
}
+function isRepeatToken(buffer) {
+ return REPEAT_PATTERN.test(buffer.join('') + Marker.CLOSE_SQUARE_BRACKET);
+}
+
module.exports = tokenize;
]
]
],
+ 'a rule with grid repeat': [
+ '.block{-ms-grid-columns:( 1fr )[5]}',
+ [
+ [
+ 'rule',
+ [
+ [
+ 'rule-scope',
+ '.block',
+ [
+ [1, 0, undefined]
+ ]
+ ]
+ ],
+ [
+ [
+ 'property',
+ [
+ 'property-name',
+ '-ms-grid-columns',
+ [
+ [1, 7, undefined]
+ ]
+ ],
+ [
+ 'property-value',
+ '( 1fr )[5]',
+ [
+ [1, 24, undefined]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ],
'a rule with two properties where first ends with a round close bracket': [
'a{width:calc(100% - 25px);width:50rem}',
[