code-notes icon indicating copy to clipboard operation
code-notes copied to clipboard

`//` Required for regex match

Open evanberkowitz opened this issue 7 years ago • 1 comments

I couldn't figure out why my notes in python weren't showing up. Looking into lib/messageChecks.js reveals that two slashes are required for a match. But some languages' comments aren't indicated with two slashes---python uses #, for example.

The workaround seems to do, eg. # // TODO: message... but that's very unnatural and easy to forget to do. It would be great if there was a more general way to detect comments (without requiring a lexer for every language, obviously). I tried changing the patterns to (for example) /([\/\/][\/\*]|#)\s*BUG:\s*(?:\(([^:]*)\))*\s*:?\s*(.*)/i but it screws up the message reporting.

evanberkowitz avatar Apr 06 '17 09:04 evanberkowitz

I think you also have problem with OPTIMIZE and FIXME regexp because these are also not working wery well

sadiqhabib avatar Apr 06 '17 11:04 sadiqhabib