better-comments icon indicating copy to clipboard operation
better-comments copied to clipboard

Comment is recognised inside a string

Open thany opened this issue 2 months ago • 0 comments

If you add this to a typescript file:

export const str = 'https://*.example.org';

It will recognise the //* part up to the end as a todo-like comment. But, this is inside a string. This happens when a string is quoted in double quotes or backticks as well.

Screenshot: Image

I'm pretty sure this is not intentional behaviour, as comments in strings aren't comments, are they 😀

I'm using VScode 1.104.3, extension version 3.0.2, on Windows 10.
This problem doesn't occur with the Better Comments extension disabled.

thany avatar Oct 03 '25 10:10 thany