Problem
Currently, patterns are matched with exact case only. For example, TODO: is highlighted but todo: and Todo: are not.
Different codebases and developers use varying conventions:
TODO: (uppercase - most common)
todo: (lowercase)
Todo: (title case)
Proposed Solution
Replace indexOf with a case-insensitive regex match:
const regex = new RegExp(value.pattern, 'gi');
let match;
while ((match = regex.exec(line)) \!== null) {
// create range using match.index and match[0].length
}
This would match all case variations while preserving the original text.
Problem
Currently, patterns are matched with exact case only. For example,
TODO:is highlighted buttodo:andTodo:are not.Different codebases and developers use varying conventions:
TODO:(uppercase - most common)todo:(lowercase)Todo:(title case)Proposed Solution
Replace
indexOfwith a case-insensitive regex match:This would match all case variations while preserving the original text.