Skip to content

Commit 5b172db

Browse files
committed
added word restriction
1 parent f9f8701 commit 5b172db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
6060
endColumn: getTextAtLine(model.getLineCount()).length + 1,
6161
});
6262

63+
const endChars = [' ', '\n', ';', '.', '(', ')', '{', '}', '[', ']', ':', ',', '<', '>', '=', '+', '-', '*', '/', '%', '&', '|', '^', '!', '?', '~', '@', '#', '$', '`', '"', "'", '\t', '\r', '\v', '\f'];
64+
if (!endChars.some(char => word.endsWith(char))) {
65+
return;
66+
}
67+
6368
try {
6469
const split = word.split('\n')
6570
if (split.length < 2) return

0 commit comments

Comments
 (0)