advanced syntaxes (VAR{}): ignore quotes around variable name
This commit is contained in:
parent
41ff331235
commit
c1669cd03d
2 changed files with 8 additions and 1 deletions
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
- bug fixes
|
||||
- issue when resizing widget using keyboard shortcuts
|
||||
- advanced syntaxes (VAR{}): avoid storing default value as string if it can be parsed as a javascript primitive (boolean, number, etc)
|
||||
- advanced syntaxes (VAR{}): avoid storing default value as string if it can be parsed as a javascript primitive (boolean, number, etc)
|
||||
- advanced syntaxes (VAR{}): ignore quotes around variable name
|
||||
|
||||
- editor
|
||||
- change keyboard shortcuts for moving widgets (now `mod + arrows`) and navigating in widgets (now `arrows`) to feel more natural with the project tree view.
|
||||
|
|
|
|||
|
|
@ -644,6 +644,12 @@ class Widget extends EventEmitter {
|
|||
} catch (err) {}
|
||||
}
|
||||
|
||||
if (
|
||||
// remove quotes
|
||||
(name[0] === '"' && name[name.length - 1] === '"') ||
|
||||
(name[0] === '\'' && name[name.length - 1] === '\'') ||
|
||||
) name = name.slice(1, name.length - 1)
|
||||
|
||||
if (!this.variables[name]) {
|
||||
|
||||
this.variables[name] = {default: value, value: value, propNames: [propName]}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue