提交 857d5457 编写于 作者: O oriash93

Case insensitive comment string matching

resolves #35589
上级 059f88f6
......@@ -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.
先完成此消息的编辑!
想要评论请 注册