mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-04 07:15:54 +01:00
html language server breaks js auto completion if imports are used. Fixes #16426
This commit is contained in:
@@ -27,6 +27,20 @@ export function getWordAtText(text: string, offset: number, wordDefinition: RegE
|
||||
return { start: offset, length: 0 };
|
||||
}
|
||||
|
||||
export function startsWith(haystack: string, needle: string): boolean {
|
||||
if (haystack.length < needle.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (let i = 0; i < needle.length; i++) {
|
||||
if (haystack[i] !== needle[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
const CR = '\r'.charCodeAt(0);
|
||||
const NL = '\n'.charCodeAt(0);
|
||||
Reference in New Issue
Block a user