From 5359db39d0f187e31ddf5d76d150c9eb7f03480d Mon Sep 17 00:00:00 2001 From: qqobb <52924060+qqobb@users.noreply.github.com> Date: Sat, 12 Jun 2021 08:44:39 +0200 Subject: [PATCH] Run JavaScript: Improve `await` regex (#2083) Tests: https://regex101.com/r/eQYCIp/1 --- chrome/content/zotero/runJS.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/runJS.js b/chrome/content/zotero/runJS.js index c3b175c905..3280dad31b 100644 --- a/chrome/content/zotero/runJS.js +++ b/chrome/content/zotero/runJS.js @@ -45,7 +45,7 @@ function handleInput() { // eslint-disable-line no-unused-vars } var code = codeEditor.getSession().getValue(); // If `await` is used, switch to async mode - if (/(^|[^=([]\s*)await\s/m.test(code)) { + if (/(^|\W)await\s/m.test(code)) { checkbox.checked = true; update(); }