better-comments
better-comments copied to clipboard
Block comments have extremely irregular selection
Issue:
Block comment detection is extremely finicky, as is detection of comments within them. The top row isn't styled at all, also if there is no white space immediately following the blockCommentStart, the whole block is thrown out.
Steps to reproduce:
/*!this breaks it all
? Why am I not colored
*/
/* ? I don't break it, but I'm not styled
! I am red
/* ! I don't work at all */
Expected outcome:
All of the above text should be colored.
Actual outcome:
None of the above text is colored.
related to #447
I discovered the same behavior with C and C++ code.
It does not seem possible to style a comment line that uses /* */
style comments on a single line.
I could style multiline comment only if the first comment line of a multiline comment started with /**
. If I remove that superfluous *
, then the styling does not work as expected.
Otherwise, this extension seems to work well.
The behavior you are describing is because jsdoc comments (/**) are styled(and more importantly, detected) differently than normal block comments. My pull request should fix this issue, provided it gets accepted.