Skip to content

Commit 2277ba4

Browse files
committed
v0.0.2
2 parents 797a9c9 + fa525ae commit 2277ba4

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

lib/rules/strip-spaces.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ module.exports = {
88
* @param {node} node
99
*/
1010
process: function(nodeType, node) {
11+
if (nodeType === 's') {
12+
node[0] = node[0].replace(/[ \t]+\n/g, '\n');
13+
}
14+
1115
if (nodeType === 'stylesheet') {
1216
if (node[node.length - 1][0] === 's') node.pop();
1317
node.push(['s', '\n']);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "csscomb",
33
"description": "Tool for beautify CSS",
4-
"version": "0.0.1",
4+
"version": "0.0.2",
55
"homepage": "http://csscomb.com/",
66
"author": "Mikhail Troshev <mishanga@yandex-team.ru>",
77
"repository": "https://github.com/mishanga/csscomb.js",

test/test.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ div{
88
top:0;
99
}
1010
div p em{
11-
font-style:italic;
12-
border-bottom:1px solid red;
13-
}
14-
11+
font-style:italic;
12+
border-bottom:1px solid red;
13+
}
14+
1515
/* Фигурные скобки. Вариант 2 */
1616
div
1717
{
1818
padding:0;
1919
margin:0;
2020
}
21-
div p
21+
div p
2222
{
2323
font-size:1px;
24-
top:0;
24+
top:0;
2525
}
2626
div p em
2727
{
28-
font-style:italic;/* inline comment*/
28+
font-style:italic;/* inline comment*/
2929
border-bottom:1px solid red;
3030
}
3131

32-
/* Фигурные скобки. Вариант 3 */
32+
/* Фигурные скобки. Вариант 3 */
3333
div {
3434
padding:0;
3535
margin:0;

0 commit comments

Comments
 (0)