Permalink
Browse files

fix hyphenated property references. Closes #20

  • Loading branch information...
1 parent 0de77f0 commit 5590c781e80ab6a25c04f100439d16763cba5e46 @tj tj committed Jan 6, 2013
Showing with 5 additions and 5 deletions.
  1. +3 −3 lib/plugins/references.js
  2. +2 −2 test/fixtures/references.css
@@ -41,11 +41,11 @@ function substitute(declarations) {
var key = decl.property;
var val = decl.value;
- decl.value = val.replace(/@(\w+)/g, function(_, name){
+ decl.value = val.replace(/@([-\w]+)/g, function(_, name){
if (null == map[name]) throw new Error('@' + name + ' is not defined in this scope');
return map[name];
});
-
+
map[key] = decl.value;
}
-}
+}
@@ -7,5 +7,5 @@ button.round {
width: 50px;
height: @width;
line-height: @height;
- background-size: @width @height;
-}
+ background-size: @width @line-height;
+}

0 comments on commit 5590c78

Please sign in to comment.