haml_coffee_assets 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/haml_coffee_assets/version.rb +1 -1
- data/lib/js/hamlcoffee.js +14 -7
- metadata +3 -3
data/lib/js/hamlcoffee.js
CHANGED
@@ -1248,7 +1248,7 @@ require.define("/nodes/haml.js", function (require, module, exports, __dirname,
|
|
1248
1248
|
};
|
1249
1249
|
|
1250
1250
|
Haml.prototype.parseAttributes = function(exp) {
|
1251
|
-
var attributes, ch, hasDataAttribute, inDataAttribute, key, keyValue, keys, level, marker, markers, pairs, pos, quoted, start, type, value, _i, _j, _len, _ref, _ref1, _ref2
|
1251
|
+
var attributes, ch, endPos, hasDataAttribute, inDataAttribute, key, keyValue, keys, level, marker, markers, pairs, pos, quoted, start, startPos, type, value, _i, _j, _len, _ref, _ref1, _ref2;
|
1252
1252
|
attributes = {};
|
1253
1253
|
if (exp === void 0) {
|
1254
1254
|
return attributes;
|
@@ -1260,7 +1260,14 @@ require.define("/nodes/haml.js", function (require, module, exports, __dirname,
|
|
1260
1260
|
level = 0;
|
1261
1261
|
start = 0;
|
1262
1262
|
markers = [];
|
1263
|
-
|
1263
|
+
if (type === '(') {
|
1264
|
+
startPos = 1;
|
1265
|
+
endPos = exp.length - 1;
|
1266
|
+
} else {
|
1267
|
+
startPos = 0;
|
1268
|
+
endPos = exp.length;
|
1269
|
+
}
|
1270
|
+
for (pos = _i = startPos; startPos <= endPos ? _i < endPos : _i > endPos; pos = startPos <= endPos ? ++_i : --_i) {
|
1264
1271
|
ch = exp[pos];
|
1265
1272
|
if (ch === '(') {
|
1266
1273
|
level += 1;
|
@@ -1279,9 +1286,9 @@ require.define("/nodes/haml.js", function (require, module, exports, __dirname,
|
|
1279
1286
|
}
|
1280
1287
|
}
|
1281
1288
|
}
|
1282
|
-
|
1283
|
-
for (_j = 0, _len =
|
1284
|
-
marker =
|
1289
|
+
_ref = markers.reverse();
|
1290
|
+
for (_j = 0, _len = _ref.length; _j < _len; _j++) {
|
1291
|
+
marker = _ref[_j];
|
1285
1292
|
exp = exp.substring(0, marker.start) + exp.substring(marker.start, marker.end).replace(/(:|=|=>)/, '\u0090$1') + exp.substring(marker.end);
|
1286
1293
|
}
|
1287
1294
|
switch (type) {
|
@@ -1296,11 +1303,11 @@ require.define("/nodes/haml.js", function (require, module, exports, __dirname,
|
|
1296
1303
|
hasDataAttribute = false;
|
1297
1304
|
while (pairs.length) {
|
1298
1305
|
keyValue = pairs.splice(0, 2);
|
1299
|
-
key = (
|
1306
|
+
key = (_ref1 = keyValue[0]) != null ? _ref1.replace(/^\s+|\s+$/g, '').replace(/^:/, '') : void 0;
|
1300
1307
|
if (quoted = key.match(/^("|')(.*)\1$/)) {
|
1301
1308
|
key = quoted[2];
|
1302
1309
|
}
|
1303
|
-
value = (
|
1310
|
+
value = (_ref2 = keyValue[1]) != null ? _ref2.replace(/^\s+|[\s,]+$/g, '').replace(/\u0090/, '') : void 0;
|
1304
1311
|
if (key === 'data') {
|
1305
1312
|
inDataAttribute = true;
|
1306
1313
|
hasDataAttribute = true;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml_coffee_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: execjs
|
@@ -109,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
segments:
|
111
111
|
- 0
|
112
|
-
hash:
|
112
|
+
hash: 3333821874032927419
|
113
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
114
|
none: false
|
115
115
|
requirements:
|