edwinhuish / better-comments-next

https://marketplace.visualstudio.com/items?itemName=EdwinHuiSH.better-comments-next
MIT License
33 stars 2 forks source link

bug with comment // * #2

Closed huiitre closed 9 months ago

huiitre commented 9 months ago

Hello, i send a bug with this ext. When i have a comment //* bad comment, solved by // * good comment (with space).

Solved totaly when i desactivate ext Better Comments (with embedded languages support).

Better Comments v3.0.2 by Aaron Bond dont have this problem

edwinhuish commented 9 months ago

Which version are you using?

I was change the reg for match only one space in v3.0.7, and matched also without space in v3.0.9

The latest version should not have this issue.

jonathonmckay commented 9 months ago

I'm having a similar problem with multi-line comments in Python. If the comment starts like """Some Text (No white space), the comment is not detected, and code further down may end up being shown as a comment. If the comment starts like """ Some Text (With a space or new line), the comment is detected correctly. Using Better Comments Next v3.0.10

edwinhuish commented 9 months ago

I think it's a bad idea to match without space. It will cause wrong coloring.

I'm thinking also disable the single line comment match with no space.

Example:

For most language, // is single comment, but the below will cause wrong strikethrough

/////////////////////  DIVIDING LINE /////////////////////

For stata

********** It should be a normal comment ***********
edwinhuish commented 9 months ago

Updated with 8bb34689ddb706ce3664b83b672022d79f1b09c8

boromyr commented 8 months ago

I have this problem with 3.1.8 too: if there is no space between the comment and the tag, the comment is not highlighted. ;! doesn't work but ; ! does

edwinhuish commented 8 months ago

I have this problem with 3.1.8 too: if there is no space between the comment and the tag, the comment is not highlighted. ;! doesn't work but ; ! does

better-comment-next now only match with ; ! (with one space) to avoid incorrect match.

For example: https://github.com/aaron-bond/better-comments/issues/393 https://github.com/aaron-bond/better-comments/issues/501 https://github.com/aaron-bond/better-comments/issues/514