diff --git a/.changeset/beige-seahorses-talk.md b/.changeset/beige-seahorses-talk.md
new file mode 100644
index 00000000..3f288f22
--- /dev/null
+++ b/.changeset/beige-seahorses-talk.md
@@ -0,0 +1,5 @@
+---
+"htmljs-parser": patch
+---
+
+Fixes an issue where attribute names that started with a keyword (eg: `as-thing` or `instanceof-thing`) were incorrectly treated as an expression continuation.
diff --git a/src/__tests__/fixtures/attr-complex-instanceof/__snapshots__/attr-complex-instanceof.expected.txt b/src/__tests__/fixtures/attr-complex-instanceof/__snapshots__/attr-complex-instanceof.expected.txt
index dc74e8d0..cce3e5d0 100644
--- a/src/__tests__/fixtures/attr-complex-instanceof/__snapshots__/attr-complex-instanceof.expected.txt
+++ b/src/__tests__/fixtures/attr-complex-instanceof/__snapshots__/attr-complex-instanceof.expected.txt
@@ -44,17 +44,34 @@
╰─ ╰─ tagName "tag"
7╭─
╰─ ╰─ openTagEnd
-8╭─ tag a = 'foo' instanceof, b
- │ │ │ │ │ │ ╰─ attrName
- │ │ │ │ │ ╰─ attrName "instanceof"
+8╭─ tag a = 'foo' instanceof-test;
+ │ │ │ │ │ ╰─ attrName "instanceof-test"
│ │ │ │ ╰─ attrValue.value "'foo'"
│ │ │ ╰─ attrValue "= 'foo'"
│ │ ╰─ attrName
│ ├─ closeTagEnd(tag)
╰─ ╰─ tagName "tag"
-9╭─
- ╰─ ╰─ openTagEnd
-10╭─
+9╭─ tag a = 'foo' instanceof_test;
+ │ │ │ │ │ ╰─ attrName "instanceof_test"
+ │ │ │ │ ╰─ attrValue.value "'foo'"
+ │ │ │ ╰─ attrValue "= 'foo'"
+ │ │ ╰─ attrName
+ │ ├─ closeTagEnd(tag)
+ │ ├─ openTagEnd
+ ╰─ ╰─ tagName "tag"
+10╭─
+ ╰─ ╰─ openTagEnd
+11╭─ tag a = 'foo' instanceof, b
+ │ │ │ │ │ │ ╰─ attrName
+ │ │ │ │ │ ╰─ attrName "instanceof"
+ │ │ │ │ ╰─ attrValue.value "'foo'"
+ │ │ │ ╰─ attrValue "= 'foo'"
+ │ │ ╰─ attrName
+ │ ├─ closeTagEnd(tag)
+ ╰─ ╰─ tagName "tag"
+12╭─
+ ╰─ ╰─ openTagEnd
+13╭─
│ ││ │ │ │ │ ││ │ ╰─ closeTagEnd(tag)
│ ││ │ │ │ │ ││ ╰─ closeTagName "tag"
│ ││ │ │ │ │ │╰─ closeTagStart ""
@@ -66,7 +83,7 @@
│ │╰─ tagName "tag"
│ ├─ closeTagEnd(tag)
╰─ ╰─ openTagStart
-11╭─
+14╭─
│ ││ │ │ │ │ ╰─ openTagEnd:selfClosed "/>"
│ ││ │ │ │ ╰─ attrName "instanceof"
│ ││ │ │ ╰─ attrValue.value "'foo'"
@@ -74,17 +91,17 @@
│ ││ ╰─ attrName
│ │╰─ tagName "tag"
╰─ ╰─ openTagStart
-12├─
-13╭─ tag a = 'foo' instanceofthing String
+15├─
+16╭─ tag a = 'foo' instanceofthing String
│ │ │ │ │ │ ╰─ attrName "String"
│ │ │ │ │ ╰─ attrName "instanceofthing"
│ │ │ │ ╰─ attrValue.value "'foo'"
│ │ │ ╰─ attrValue "= 'foo'"
│ │ ╰─ attrName
╰─ ╰─ tagName "tag"
-14╭─
+17╭─
╰─ ╰─ openTagEnd
-15╭─ tag a = 'foo' instanceof
+18╭─ tag a = 'foo' instanceof
│ │ │ │ │ │ ├─ closeTagEnd(tag)
│ │ │ │ │ │ ╰─ openTagEnd
│ │ │ │ │ ╰─ attrName "instanceof"
diff --git a/src/__tests__/fixtures/attr-complex-instanceof/input.marko b/src/__tests__/fixtures/attr-complex-instanceof/input.marko
index 12dc9920..1f68b80b 100644
--- a/src/__tests__/fixtures/attr-complex-instanceof/input.marko
+++ b/src/__tests__/fixtures/attr-complex-instanceof/input.marko
@@ -5,6 +5,9 @@ tag a = 'foo' instanceof := String
tag a = 'foo' instanceof= String
tag a = 'foo' instanceof;
+tag a = 'foo' instanceof-test;
+tag a = 'foo' instanceof_test;
+
tag a = 'foo' instanceof, b
diff --git a/src/states/EXPRESSION.ts b/src/states/EXPRESSION.ts
index da05cc4b..c1ca28c1 100644
--- a/src/states/EXPRESSION.ts
+++ b/src/states/EXPRESSION.ts
@@ -342,8 +342,8 @@ function lookAheadForOperator(data: string, pos: number): number {
nextPos = lookAheadWhile(isWhitespaceCode, data, nextPos + 2);
if (nextPos === max) return -1;
nextCode = data.charCodeAt(nextPos);
- } else if (isWordCode(nextCode)) {
- // bail if we are continuing a word, eg "**in**teger"
+ } else {
+ // bail if we didn't match a space keyword.
return -1;
}