advanced syntaxes: ignores quotes around file path in IMPORT{}

This commit is contained in:
jean-emmanuel 2022-11-06 12:29:44 +01:00
parent 4de6c33f5a
commit 5af6abb06d
2 changed files with 7 additions and 0 deletions

View file

@ -4,6 +4,7 @@
- bug fixes
- scripting: prevent some functions to be marked as undefined
- advanced syntaxes: ignores quotes around file path in `IMPORT{}`
- misc
- change noFocus client option behavior: the defalt client window now doesn't take the focus at all, even when a text input is clicked.

View file

@ -759,6 +759,12 @@ class Widget extends EventEmitter {
})
propValue = balancedReplace('IMPORT', '{', '}', propValue, (file)=>{
if (
// remove quotes
(file[0] === '"' && file[file.length - 1] === '"') ||
(file[0] === '\'' && file[file.length - 1] === '\'')
) file = file.slice(1, file.length - 1)
if (storeLinks) {
if (!this.fragments[file]) this.fragments[file] = []
if (!this.fragments[file].includes(propName)) this.fragments[file].push(propName)