Skip to content
Browse files

into to_short_hex() added #

  • Loading branch information...
1 parent a480259 commit 302d9f186965ee577c725eb92036886f10845999 @monolithed committed May 19, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 CoffeeScript version/README.md
  2. +1 −1 JavaScript version/toCSS.js
View
2 CoffeeScript version/README.md
@@ -65,7 +65,7 @@ html body div > p {
}
input {
- border: #101;
+ border: 1px solid #101;
}
```
View
2 JavaScript version/toCSS.js
@@ -104,7 +104,7 @@ var toCSS = new function() {
*/
to_short_hex: function(text) {
return text.replace(/#([\da-fA-F]{6})\b/g, function() {
- return RegExp.$1.split('').filter(function(element, i) {
+ return '#' + RegExp.$1.split('').filter(function(element, i) {
return i % 2 == i++ % 2 && i % 2;
}).join('');
});

0 comments on commit 302d9f1

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