widget: better regexp for @{} syntax

This commit is contained in:
jean-emmanuel 2018-10-18 10:41:11 +02:00
parent e7688eeed9
commit fa9d7eaab0

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))