prop-inheritance: fix some nested syntax cases (#516)
This commit is contained in:
parent
99e186a144
commit
472fc05dca
2 changed files with 12 additions and 5 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue