Gruntfuggly / todo-tree

Use ripgrep to find TODO tags and display the results in a tree view
Other
1.45k stars 142 forks source link

Improve regex by matching long comments #572

Closed MaddyGuthridge closed 3 years ago

MaddyGuthridge commented 3 years ago

Currently, a comment such as

/**
 * This is some random long-form comment
 * Perhaps it is documenting some sort of function
 * 
 * FIXME: This tag won't appear!
**/

won't show up in this extension.

This can be easily fixed by changing the default regex to (//|\*|#|<!--|;|/\*|^|^[ \t]*(-|\d+.))\s*($TAGS). Although this works, I'm not very good at regex, so it'd be awesome if someone made sure that this doesn't break things elsewhere before the fix gets added.

Gruntfuggly commented 3 years ago

Thanks, but I no longer update the default regex as it causes issues for people who use the default.

The default is really just a starting point - it can't possibly work for everybody.

I will add your definition to the wiki though.