Skip to content

Commit

Permalink
Allow newlines in computed binding argument list
Browse files Browse the repository at this point in the history
This allows breaking in the middle of computed bindings, e.g.:

```
<div hidden$="[[_someVeryLongFunctionName(
                  someVeryLongArg,
                  anotherCrazyLongArg]]">
```

Note that `[\s\S]*` [doesn't seem to have worse performance]( http://jsperf.com/javascript-multiline-regexp-workarounds/5) than `.*`.
  • Loading branch information
mgiuffrida committed Sep 26, 2015
1 parent c2b7c31 commit b745f45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/standard/effectBuilder.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
// method expressions are of the form: `name([arg1, arg2, .... argn])`
_parseMethod: function(expression) {
// tries to match valid javascript property names
var m = expression.match(/([^\s]+)\((.*)\)/);
var m = expression.match(/([^\s]+)\(([\s\S]*)\)/);
if (m) {
var sig = { method: m[1], static: true };
if (m[2].trim()) {
Expand Down

0 comments on commit b745f45

Please sign in to comment.