vscode-todo-highlight icon indicating copy to clipboard operation
vscode-todo-highlight copied to clipboard

Limit the pattern matching to comments

Open mrvkino opened this issue 5 years ago • 1 comments

Is there a way to do the pattern matching only in the comment without adding it in the regex? An option in the setting could be nice, this could use the language syntax to detect comment section and perform the regex matching.

If there is already a solution I didn't find one that could work on all language.

mrvkino avatar Nov 26 '20 19:11 mrvkino

This is a good idea, @mrvkino. I've added this as a suggested enhancement. (I'm not the original author, and I don't really know Javascript, so I'm not going to attempt it, but I'm happy to test PRs and release new versions to the marketplace.)

If you only work in languages that between them have a few different comment styles, it takes very little time to add multiple regex that cover this.

jgclark avatar Nov 27 '20 16:11 jgclark