Permalink
Browse files

Release 0.8.6

  • Loading branch information...
1 parent 8dede89 commit aef5f77e5b20012103258b074145d509f8bbe1c1 @netzpirat netzpirat committed Apr 30, 2012
Showing with 9 additions and 3 deletions.
  1. +4 −0 CHANGELOG.md
  2. +1 −1 lib/haml_coffee_assets/version.rb
  3. +4 −2 lib/js/haml-coffee.js
View
4 CHANGELOG.md
@@ -2,6 +2,10 @@
Please also have a look at the [Haml Coffee Changelog](https://github.com/9elements/haml-coffee/blob/master/CHANGELOG.md).
+## 0.8.6 - April 30, 2012
+
+- [Issue #40](https://github.com/netzpirat/haml_coffee_assets/issues/40): Fix special class interpolation. ([@netzpirat][])
+
## 0.8.5 - April 16, 2012
- [Pull #38](https://github.com/netzpirat/haml_coffee_assets/pull/38): Fix `customSurround` option. ([@dzello][])
View
2 lib/haml_coffee_assets/version.rb
@@ -1,5 +1,5 @@
# coding: UTF-8
module HamlCoffeeAssets
- VERSION = '0.8.5' unless defined?(HamlCoffeeAssets::VERSION)
+ VERSION = '0.8.6' unless defined?(HamlCoffeeAssets::VERSION)
end
View
6 lib/js/haml-coffee.js
@@ -904,7 +904,7 @@ require.define("/util/text.js", function (require, module, exports, __dirname, _
},
escapeQuotes: function(text) {
if (!text) return '';
- return text.replace(/"/g, '\\"');
+ return text.replace(/"/g, '\\"').replace(/\\\\\"/g, '"');
},
unescapeQuotes: function(text) {
if (!text) return '';
@@ -1195,8 +1195,10 @@ require.define("/nodes/haml.js", function (require, module, exports, __dirname,
_ref = tokens.classes;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
klass = _ref[_i];
- if (interpolation = klass.match(/#{(.*)}/)) {
+ if (interpolation = klass.match(/^#{(.*)}$/)) {
classes += "(" + interpolation[1] + "),";
+ } else if (interpolation = klass.match(/#{(.*)}/)) {
+ classes += "\\\"" + klass + "\\\"";
} else {
classes += "'" + klass + "',";
}

0 comments on commit aef5f77

Please sign in to comment.