fix(core.gbapp): Now and Today are now OK.
This commit is contained in:
parent
f4b003de25
commit
13f9bb3e76
1 changed files with 4 additions and 2 deletions
|
@ -320,10 +320,12 @@ export class GBVMService extends GBService {
|
|||
code = parsedCode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
parsedCode = this.handleThisAndAwait(parsedCode);
|
||||
|
||||
parsedCode = parsedCode.replace(/(now)(?=(?:[^"]|"[^"]*")*$)/, 'await this.getNow(step)');
|
||||
parsedCode = parsedCode.replace(/(today)(?=(?:[^"]|"[^"]*")*$)/, 'await this.getToday(step)');
|
||||
parsedCode = parsedCode.replace(/(now)(?=(?:[^"]|"[^"]*")*$)/gi, 'await this.getNow(step)');
|
||||
parsedCode = parsedCode.replace(/(today)(?=(?:[^"]|"[^"]*")*$)/gi, 'await this.getToday(step)');
|
||||
|
||||
parsedCode = beautify(parsedCode, { indent_size: 2, space_in_empty_paren: true });
|
||||
fs.writeFileSync(jsfile, parsedCode);
|
||||
|
|
Loading…
Add table
Reference in a new issue