Run JavaScript: Detect await
at the beginning of a line
This commit is contained in:
parent
018f04f369
commit
1040ba0b5e
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ function handleInput() { // eslint-disable-line no-unused-vars
|
||||||
}
|
}
|
||||||
var code = codeEditor.getSession().getValue();
|
var code = codeEditor.getSession().getValue();
|
||||||
// If `await` is used, switch to async mode
|
// If `await` is used, switch to async mode
|
||||||
if (/[^=([]\s*await\s/m.test(code)) {
|
if (/(^|[^=([]\s*)await\s/m.test(code)) {
|
||||||
checkbox.checked = true;
|
checkbox.checked = true;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue