haml_coffee_assets 1.13.2 → 1.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/haml_coffee_assets/version.rb +1 -1
- data/lib/js/hamlcoffee.js +9 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce5b67f40c2877808d6597bd2d7f766955a44c8f
|
4
|
+
data.tar.gz: 0692d7a99099b5e7a2c585259676ca46da402b39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d45d16bb55bc4e3bc5ee9ee5748ba2f85cca60005bd6b65d6dfe349b36488503142144e708c8ba6ee6888df462e46ad19e48dd167bd6a392b0500eb061cb2cdc
|
7
|
+
data.tar.gz: 97686ceeca292dab16192d62a24e78d5ef469dfedd994d7789908c8ccceb4189c10e6a6b76eeed85a210cfaacac9ae2f6e1e1994bb7a58a80637059c276ffe3b
|
data/lib/js/hamlcoffee.js
CHANGED
@@ -454,7 +454,7 @@ require.define("/haml-coffee.coffee",function(require,module,exports,__dirname,_
|
|
454
454
|
indent = require('./util/text').indent;
|
455
455
|
|
456
456
|
module.exports = HamlCoffee = (function() {
|
457
|
-
HamlCoffee.VERSION = '1.
|
457
|
+
HamlCoffee.VERSION = '1.12.0';
|
458
458
|
|
459
459
|
function HamlCoffee(options) {
|
460
460
|
var segment, segments, _base, _base1, _base10, _base11, _base12, _base13, _base2, _base3, _base4, _base5, _base6, _base7, _base8, _base9, _i, _len;
|
@@ -674,7 +674,7 @@ require.define("/haml-coffee.coffee",function(require,module,exports,__dirname,_
|
|
674
674
|
if (/^\s*$/.test(line)) {
|
675
675
|
continue;
|
676
676
|
}
|
677
|
-
while (/^[%.#].*[{(]/.test(expression) && !/^(\s*)[-=&!~.%#</]/.test(lines[0]) && /([-\w]+[\w:-]*\w?)\s*=|('\w+[\w:-]*\w?')\s*=|("\w+[\w:-]*\w?")\s*=|(\w+[\w:-]*\w?):|('[-\w]+[\w:-]*\w?'):|("[-\w]+[\w:-]*\w?"):|:(\w+[\w:-]*\w?)\s*=>|:?'([-\w]+[\w:-]*\w?)'\s*=>|:?"([-\w]+[\w:-]*\w?)"\s*=>/.test(lines[0])) {
|
677
|
+
while (/^[%.#].*[{(]/.test(expression) && RegExp("^\\s{" + (this.tabSize + 2) + ",}").test(lines[0]) && !/^(\s*)[-=&!~.%#</]/.test(lines[0]) && /([-\w]+[\w:-]*\w?)\s*=|('\w+[\w:-]*\w?')\s*=|("\w+[\w:-]*\w?")\s*=|(\w+[\w:-]*\w?):|('[-\w]+[\w:-]*\w?'):|("[-\w]+[\w:-]*\w?"):|:(\w+[\w:-]*\w?)\s*=>|:?'([-\w]+[\w:-]*\w?)'\s*=>|:?"([-\w]+[\w:-]*\w?)"\s*=>/.test(lines[0])) {
|
678
678
|
attributes = lines.shift();
|
679
679
|
expression = expression.replace(/(\s)+\|\s*$/, '');
|
680
680
|
expression += ' ' + attributes.match(/^\s*(.*?)(\s+\|\s*)?$/)[1];
|
@@ -834,7 +834,7 @@ require.define("/haml-coffee.coffee",function(require,module,exports,__dirname,_
|
|
834
834
|
if (this.options.customSurround) {
|
835
835
|
fn += "surround = (start, end, fn) => " + this.options.customSurround + ".call(@, start, end, fn)\n";
|
836
836
|
} else {
|
837
|
-
fn += "surround = (start, end, fn) => start + fn.call(@)?.replace(
|
837
|
+
fn += "surround = (start, end, fn) => start + fn.call(@)?.replace(/^\\s+|\\s+$/g, '') + end\n";
|
838
838
|
}
|
839
839
|
}
|
840
840
|
if (code.indexOf('succeed') !== -1) {
|
@@ -1331,7 +1331,12 @@ require.define("/nodes/haml.coffee",function(require,module,exports,__dirname,__
|
|
1331
1331
|
} else {
|
1332
1332
|
tokens.tag = tokens.tag.replace(/\/$/, '');
|
1333
1333
|
prefix = this.buildHtmlTagPrefix(tokens);
|
1334
|
-
|
1334
|
+
if (tokens.text) {
|
1335
|
+
this.opener = this.markText("" + prefix + ">" + tokens.text);
|
1336
|
+
return this.closer = this.markText("</" + tokens.tag + ">");
|
1337
|
+
} else {
|
1338
|
+
return this.opener = this.markText("" + prefix + (this.format === 'xhtml' ? ' /' : '') + ">" + tokens.text);
|
1339
|
+
}
|
1335
1340
|
}
|
1336
1341
|
}
|
1337
1342
|
};
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml_coffee_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Kessler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coffee-script
|