Skip to content

Commit a7f6e9f

Browse files
committed
Fix baseToken to actually return the token ahead when on boundary
1 parent 40a8182 commit a7f6e9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/line/highlight.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Context {
3030

3131
baseToken(n) {
3232
if (!this.baseTokens) return null
33-
while (this.baseTokens[this.baseTokenPos] < n)
33+
while (this.baseTokens[this.baseTokenPos] <= n)
3434
this.baseTokenPos += 2
3535
let type = this.baseTokens[this.baseTokenPos + 1]
3636
return {type: type && type.replace(/( |^)overlay .*/, ""),

0 commit comments

Comments
 (0)