todo-tree
todo-tree copied to clipboard
Always matching the rest of the line even when regex has a clear end point
I have this regex here that supports multiple types of multiline comments paying attention to each of their closing expressions:
r"(([ \t]*(//+|#|;|((^|^[ ]+)(-|\*|\+)[ ]))[ ]*(-[ ]?|\*[ ]?|\+[ ]?)?(TODO)([: ][^\n]+))(\n[ \t]*(//+|#|;|((^|[ ]+)(-|\*|\+)[ ]))[ ]*([^\n]+))*)|((/\*\*?(\n[ \t*]*)?[ ]?(TODO)[\s\S]+?\*/)|(<!--[ ]?(TODO)[\s\S]+?-->)|(<!--[ ]?(TODO)[\s\S]+?-->))"
https://regex101.com/r/OxJZWP/3
I wanna specifically point out these matched lines in regex101:
This is how they show up in vscode when I use the exact same regex:
My current guess is that todo-tree seems to be using version 1.0.0 of rust's regex crate, while regex101 (as of now) is using version 1.10.3, but I'm not sure if that is quite right. If the error is on my part, please tell me.