tzachov / vscode-todo-list

VSCode Extension that lists all of your TODO-type comments in an easy-to-read tree view panel
https://marketplace.visualstudio.com/items?itemName=TzachOvadia.todo-list
19 stars 3 forks source link

How to change RegExp to include python TODOS? #52

Open Fontanapink opened 2 years ago

Fontanapink commented 2 years ago

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 #

callemein commented 2 years ago

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.