Skip to content

Commit 0c475b5

Browse files
committed
Merge pull request #120 from csscomb/tg/224-data-uri-test
Add test for csscomb/csscomb#224
2 parents 81aa883 + 85f8ca0 commit 0c475b5

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

test/sort-order.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,31 @@ describe('options/sort-order', function() {
116116
assert.equal(comb.processString(input), expected);
117117

118118
});
119+
120+
it('Should parse semicolons inside data uri correctly', function() {
121+
122+
var config = {
123+
'sort-order': [
124+
['position', 'background', 'color']
125+
]
126+
};
127+
128+
var input = 'a\n' +
129+
'{\n' +
130+
'\tcolor: tomato;\n' +
131+
'\tbackground: #D2D2D2 no-repeat url(\'data:image/svg+xml;charset=US-ASCII.naninani\');\n' +
132+
'\tposition: absolute;\n' +
133+
'}';
134+
135+
var expected = 'a\n' +
136+
'{\n' +
137+
'\tposition: absolute;\n' +
138+
'\tbackground: #D2D2D2 no-repeat url(\'data:image/svg+xml;charset=US-ASCII.naninani\');\n' +
139+
'\tcolor: tomato;\n' +
140+
'}';
141+
142+
comb.configure(config);
143+
assert.equal(comb.processString(input), expected);
144+
145+
});
119146
});

0 commit comments

Comments
 (0)