fix(completion): replace unicode identifier prefixes correctly
Closes #7891
This commit is contained in:
1 parent
7b0a8cc111
commit
65abc74590
3 files changed
+73
-8
No files matched your search
@@ -13,6 +13,12 @@ describe("sqlSemanticTokens", () => {
|
||||
expect(tokens.some((token) => token.kind === "string" && token.text === "'it''s ok'")).toBe(true);
|
||||
});
|
||||
|
||||
it("tokenizes Unicode identifier prefixes as complete word tokens", () => {
|
||||
const tokens = tokenizeSqlSemantic("SELECT 名称 客户名称 𠀀字段", "sqlserver");
|
||||
|
||||
expect(tokens.filter((token) => token.kind === "word").map((token) => token.text)).toEqual(["SELECT", "名称", "客户名称", "𠀀字段"]);
|
||||
});
|
||||
|
||||
it("marks comments and string literals as suppressed contexts", () => {
|
||||
const sql = "select * from users -- user.";
|
||||
const tokens = tokenizeSqlSemantic(sql);
|
||||
|
||||
Reference in new issue
Block a user