Why:
* `~` marker can be used both to denote adjacent selectors and inside
an attribute matcher.
==================
* Fixed issue [#887](https://github.com/jakubpawlowicz/clean-css/issues/887) - edge case in serializing comments.
+* Fixed issue [#953](https://github.com/jakubpawlowicz/clean-css/issues/953) - beautify breaks attribute selectors.
[4.1.5 / 2017-06-29](https://github.com/jakubpawlowicz/clean-css/compare/v4.1.4...v4.1.5)
==================
isNewLineNix = character == Marker.NEW_LINE_NIX;
isNewLineWin = character == Marker.NEW_LINE_NIX && value[i - 1] == Marker.NEW_LINE_WIN;
isQuoted = isSingleQuoted || isDoubleQuoted;
- isRelation = !isEscaped && roundBracketLevel === 0 && RELATION_PATTERN.test(character);
+ isRelation = !isAttribute && !isEscaped && roundBracketLevel === 0 && RELATION_PATTERN.test(character);
isWhitespace = WHITESPACE_PATTERN.test(character);
if (wasEscaped && isQuoted && isNewLineWin) {
'a{color:red}',
'a {' + lineBreak + ' color: red' + lineBreak + '}'
],
+ 'rule with fancy selector': [
+ '.block[data-col~="5th"]{color:red}',
+ '.block[data-col~="5th"] {' + lineBreak + ' color: red' + lineBreak + '}'
+ ],
'rules': [
'a{color:red}p{color:#000;width:100%}',
'a {' + lineBreak + ' color: red' + lineBreak + '}' + lineBreak + 'p {' + lineBreak + ' color: #000;' + lineBreak + ' width: 100%' + lineBreak + '}'