widget: better regexp for @{} syntax

This commit is contained in:
jean-emmanuel 2018-10-18 10:41:11 +02:00
parent 0b41bd5532
commit 41d4b2b635

View file

@ -334,7 +334,7 @@ class Widget extends EventEmitter {
if (typeof propValue == 'string') {
propValue = propValue.replace(/@\{[^{]*?(@\{.*?\})?[^{]*?\}/g, (m, nested)=>{
propValue = propValue.replace(/@\{(?:[^{}]|(@\{[^{}]*\}))*\}/g, (m, nested)=>{
if (nested) {
m = m.replace(nested, this.resolveProp(propName, nested, false, this))