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

How to change RegExp to include python TODOS?

Open Fontanapink opened this issue 3 years ago • 1 comments

So, looking at the default RegExp: (?://|/*|<!--)[ ]?([A-Z]+)(?: |:|(([A-Za-z/\d ]+)):)[ ]?(.*?)[ ]?(?:-->|*/|$) I have absolutely no idea how to do this. Python comments start with a #

Fontanapink avatar Jan 24 '22 18:01 Fontanapink

I just changed the regex to include python comment hashtags by adding #| to the regex. My total regex looks like: (?:\#|\/\/|\/\*|\<\!--)[ ]?([A-Z]+)(?: |\:|\(([A-Za-z\/\d ]+)\)\:)[ ]?(.*?)[ ]?(?:--\>|\*\/|$)

So far, this works fine.

callemein avatar May 14 '22 12:05 callemein