Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Upgrade to Haml Coffee 0.8.1 (Fixes #46)

  • Loading branch information...
commit 7e891f824ece619884e8ec9ef803bb5f1b2555df 1 parent d02c600
@netzpirat authored
Showing with 10 additions and 3 deletions.
  1. +7 −2 CHANGELOG.md
  2. +3 −1 lib/js/hamlcoffee.js
View
9 CHANGELOG.md
@@ -4,14 +4,19 @@ Please also have a look at the [Haml Coffee Changelog](https://github.com/9eleme
## Master
+- Upgrade to Haml Coffee 0.8.1
+- [Issue #46](https://github.com/netzpirat/haml_coffee_assets/issues/46): Attribute parsing partially broken. ([@netzpirat][])
+
+## 0.9.2 - Mai 21, 2012
+
- Upgrade to Haml Coffee 0.8.0
- Internal refactoring and more specs added.
-## 0.9.1 - Mail 14, 2012
+## 0.9.1 - Mai 14, 2012
- Upgrade to Haml Coffee 0.7.1
-## 0.9.0 - Mail 9, 2012
+## 0.9.0 - Mai 9, 2012
- Upgrade to Haml Coffee 0.7.0
View
4 lib/js/hamlcoffee.js
@@ -1243,10 +1243,12 @@ require.define("/nodes/haml.js", function (require, module, exports, __dirname,
var attributes, dataAttribute, key, keyValue, keys, pairs, quoted, type, value, _ref, _ref1;
attributes = {};
type = exp.substring(0, 1);
+ exp = exp.replace(/(=|:|=>)\s*('([^\\']|\\\\|\\')*'|"([^\\"]|\\\\|\\")*")/g, function(match, type, value) {
+ return type + (value != null ? value.replace(/(:|=|=>)/, '\u0090$1') : void 0);
+ });
switch (type) {
case '(':
keys = /\(\s*([-\w]+[\w:-]*\w?)\s*=|\s+([-\w]+[\w:-]*\w?)\s*=|\(\s*('\w+[\w:-]*\w?')\s*=|\s+('\w+[\w:-]*\w?')\s*=|\(\s*("\w+[\w:-]*\w?")\s*=|\s+("\w+[\w:-]*\w?")\s*=/g;
- exp = exp.replace(/\=\s*"([^"]*?)=([^"]*?)"/g, '="$1\u0090=$2"').replace(/\=\s*'([^']*?)=([^']*?)'/g, '=\'$1\u0090=$2\'');
break;
case '{':
keys = /[{,]\s*(\w+[\w:-]*\w?):|[{,]\s*('[-\w]+[\w:-]*\w?'):|[{,]\s*("[-\w]+[\w:-]*\w?"):|[{,]\s*:(\w+[\w:-]*\w?)\s*=>|[{,]\s*:?'([-\w]+[\w:-]*\w?)'\s*=>|[{,]\s*:?"([-\w]+[\w:-]*\w?)"\s*=>/g;
Please sign in to comment.
Something went wrong with that request. Please try again.