Allow newlines in computed binding argument list

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 `.*`.
This commit is contained in:
Michael Giuffrida 2015-09-26 15:20:28 -07:00
parent c2b7c31b8e
commit b745f45e1f

View File

@ -169,7 +169,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// 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()) {