Skip to content

Commit

Permalink
Merge pull request #44998 from oriash93/oriash93/35589
Browse files Browse the repository at this point in the history
Case insensitive comment string matching
  • Loading branch information
alexdima committed Mar 26, 2018
2 parents 3f2b294 + 857d545 commit 939ae9e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vs/editor/contrib/comment/blockCommentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 939ae9e

Please sign in to comment.