fixed highlighting highlighting keywords inside other words

This commit is contained in:
Snorre 2025-03-25 12:05:13 +01:00
parent f4fd3337ea
commit b2bb4397dd

View file

@ -24,6 +24,10 @@ const match = (m) => (peek, take) => {
return true;
}
const match_identifier = (m) => (peek, take) => {
try {
if (peek(-1).match(/[0-9a-z_]/))
return false;
} catch {}
if (match(m)(peek, take)) {
if (peek(0).match(/[0-9a-z]/)) {
take(-m.length);