未验证 提交 939ae9e4 编写于 作者: A Alexandru Dima 提交者: GitHub

Merge pull request #44998 from oriash93/oriash93/35589

Case insensitive comment string matching
......@@ -32,8 +32,11 @@ export class BlockCommentCommand implements editorCommon.ICommand {
if (offset + needleLength > haystackLength) {
return false;
}
const haystackUpper = haystack.toUpperCase();
const needleUpper = needle.toUpperCase();
for (let i = 0; i < needleLength; i++) {
if (haystack.charCodeAt(offset + i) !== needle.charCodeAt(i)) {
if (haystackUpper.charCodeAt(offset + i) !== needleUpper.charCodeAt(i)) {
return false;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册