mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-27 23:30:30 -04:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
@@ -32,10 +32,24 @@ export class BlockCommentCommand implements editorCommon.ICommand {
|
||||
if (offset + needleLength > haystackLength) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (let i = 0; i < needleLength; i++) {
|
||||
if (haystack.charCodeAt(offset + i) !== needle.charCodeAt(i)) {
|
||||
return false;
|
||||
const codeA = haystack.charCodeAt(offset + i);
|
||||
const codeB = needle.charCodeAt(i);
|
||||
|
||||
if (codeA === codeB) {
|
||||
continue;
|
||||
}
|
||||
if (codeA >= CharCode.A && codeA <= CharCode.Z && codeA + 32 === codeB) {
|
||||
// codeA is upper-case variant of codeB
|
||||
continue;
|
||||
}
|
||||
if (codeB >= CharCode.A && codeB <= CharCode.Z && codeB + 32 === codeA) {
|
||||
// codeB is upper-case variant of codeA
|
||||
continue;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user