Skip to content

Commit e8521c2

Browse files
committed
Align interpretation of wordChars language data with @codemirror/state
1 parent d5e37b3 commit e8521c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/word.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function collectWords(doc: Text, cache: WeakMap<Text, readonly Completion[]>, wo
6969
/// [character categorizer](#state.EditorState.charCategorizer)), and
7070
/// return those as completions.
7171
export const completeAnyWord: CompletionSource = context => {
72-
let wordChars = context.state.languageDataAt<string>("wordChars", context.pos).join("")
72+
let wordChars = context.state.languageDataAt<string>("wordChars", context.pos)[0] ?? ""
7373
let re = wordRE(wordChars)
7474
let token = context.matchBefore(mapRE(re, s => s + "$"))
7575
if (!token && !context.explicit) return null

0 commit comments

Comments
 (0)