mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
c2b7c31b8e
commit
b745f45e1f
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user