Merge VS Code 1.23.1 (#1520)

This commit is contained in:
Matt Irvine
2018-06-05 11:24:51 -07:00
committed by GitHub
parent e3baf5c443
commit 0c58f09e59
3651 changed files with 74249 additions and 48599 deletions

View File

@@ -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;
}