Skip to content

Commit 16fd65a

Browse files
committed
fix: issue with division expressions
1 parent c934872 commit 16fd65a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/states/EXPRESSION.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ function buildOperatorPattern(isConcise: boolean) {
226226
const binary =
227227
"[*%<&^|?:]" + // Any of these characters can always continue an expression
228228
"|=[=>]" + // We only continue after an equals if it is => or ==
229-
"|/[^*/>]" + // We only continue after a forward slash if it isn't //, /* or />
229+
"|/(?:\\b|\\s)" + // We only continue after a forward slash if it isn't //, /* or />
230230
"|\\.(?=\\s)" + // We only continue after a period if it's followed by a space
231231
"|\\bin(?:stanceof)(?=\\s+[^=/,;:>])"; // We only continue after word operators (instanceof/in) when they are not followed by a terminator
232232
const unary =

0 commit comments

Comments
 (0)