prop-inheritance: fix some nested syntax cases (#516)

This commit is contained in:
jean-emmanuel 2019-04-15 13:07:18 +02:00
parent 99e186a144
commit 472fc05dca
2 changed files with 12 additions and 5 deletions

View file

@ -429,16 +429,18 @@ class Widget extends EventEmitter {
if (typeof propValue == 'string') {
propValue = propValue.replace(/@\{[^{}]*(@\{[^{}]*\})*[^{}]*\}/g, (m, nested)=>{
propValue = propValue.replace(/@\{[^{}]*((@\{[^{}]*\}|[^{}]*)*)\}/g, (m, nested)=>{
// pretty regexp:
// @\{
// [^{}]*
// (
// ((
// @\{
// [^{}]*
// \}
// )*
// [^{}]*
// |
// [^{}]*
// )*)
//
// \}
if (nested) {