From 42297d702683f7321a28ef6143903f2c8d487df7 Mon Sep 17 00:00:00 2001 From: Gilgamesh Athoraya Date: Sat, 5 Aug 2023 08:33:08 +0200 Subject: [PATCH] Revert "Merge pull request #1042 from Dyalog/syscmd_syntax" This reverts commit 818ed979240c6fbaea2336f2c7872d4b25ed9d46, reversing changes made to 6438e2ac70f6a057cfd7a2e3785050764315ff7b. --- src/mon_apl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mon_apl.js b/src/mon_apl.js index 4ba58cde..efe40086 100644 --- a/src/mon_apl.js +++ b/src/mon_apl.js @@ -564,12 +564,12 @@ h.l += 1; return lt; } - if (h.s && (m = line.match(/^(\s*)\)(\w*).*/))) { + if (h.s && (m = line.match(/^(\s*)\)(\w+).*/))) { if (m[1]) { addToken(offset, 'white'); offset += m[1].length; } - const token = D.syntax.scmd.some((x)=> x.startsWith(m[2].toLowerCase())) ? 'predefined.scmd' : 'invalid.scmd' ; + const token = D.syntax.scmd.indexOf(m[2].toLowerCase()) < 0 ? 'invalid.scmd' : 'predefined.scmd'; addToken(offset, token); h.l += 1; return lt;