Gruntfuggly / todo-tree

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

TODO within an inline comment affects syntax highlighting after the comment #812

Open osaxma opened 8 months ago

osaxma commented 8 months ago

originally filed at https://github.com/Dart-Code/Dart-Code/issues/4918

Describe the bug Using an inline comment with TODO in Dart code causes the code after the comment to be highlighted as a comment:

Screen Shot 2023-12-27 at 7 27 21 PM

When I disabled Todo Tree extension, the issue disappeared.

To Reproduce Sample code (.dart file):

abstract class SomeClass {
  void someMmethod(/* TODO */ String arg);
  void anotherMethod(/* NOT-TODO */ String arg);
}

Additional Context:

My guess is that they're just assuming all TODOs are in line comments (which go to the end of the line). They'd probably need to make some assumptions about the comment markers of each file to know where they really end.

(although, it's also not clear to me why they're affecting the colouring at all, unless they normally would be changing the colour of the TODOs?) from https://github.com/Dart-Code/Dart-Code/issues/4918?#issuecomment-1885248674

please let me know if you need additional info.