Skip to content
Browse files

Fixed #77: No semicolon in single CSS property

  • Loading branch information...
1 parent 04c37f3 commit e7ab5846ff4ea3a44236713bc4b337473e6d9c8c @sergeche sergeche committed Aug 18, 2012
Showing with 6 additions and 2 deletions.
  1. +2 −2 javascript/resolvers/css.js
  2. +4 −0 javascript/unittest/tests/css-resolver.js
View
4 javascript/resolvers/css.js
@@ -169,9 +169,9 @@ zen_coding.define('cssResolver', function(require, _) {
return {
name: utils.trim(pair.shift()),
- // replace ${0} tabstop since to produce valid vendor-prefixed values
+ // replace ${0} tabstop to produce valid vendor-prefixed values
// where possible
- value: utils.trim(pair.join(':')).replace(/^(\$\{0\}|\$0)(\s*;?)$/, '\$$2')
+ value: utils.trim(pair.join(':')).replace(/^(\$\{0\}|\$0)(\s*;?)$/, '${1}$2')
};
}
View
4 javascript/unittest/tests/css-resolver.js
@@ -77,6 +77,10 @@ test('Expand Abbreviation action handler', function() {
actions.run(name, editorStub);
};
+ editorStub.replaceContent('p${0}');
+ run('expand_abbreviation');
+ equal(editorStub.getContent(), 'padding: ;', 'Expanded "p"');
+
editorStub.replaceContent('p0${0}');
run('expand_abbreviation');
equal(editorStub.getContent(), 'padding: 0;', 'Expanded "p0"');

0 comments on commit e7ab584

Please sign in to comment.
Something went wrong with that request. Please try again.