advanced syntaxes: support @{} inside IMPORT{}

This commit is contained in:
jean-emmanuel 2023-04-14 07:24:31 +02:00
parent 968af3994b
commit 22927983b8
2 changed files with 8 additions and 0 deletions

View file

@ -5,6 +5,9 @@
- bug fixes
- launcher: `Ctrl+M` keyboard shortcut not working
- advanced syntaxes
- support `@{}` inside `IMPORT{}`
## 1.24.0
- bug fixes

View file

@ -775,6 +775,11 @@ class Widget extends EventEmitter {
})
propValue = balancedReplace('IMPORT', '{', '}', propValue, (file)=>{
file = file.replace(/VAR_[0-9]+/g, (m)=>{
return typeof variables[m] === 'string' ? variables[m] : JSON.stringify(variables[m])
})
if (
// remove quotes
(file[0] === '"' && file[file.length - 1] === '"') ||