Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block comments have extremely irregular selection #456

Open
aarondill opened this issue Dec 6, 2022 · 2 comments · May be fixed by #457
Open

Block comments have extremely irregular selection #456

aarondill opened this issue Dec 6, 2022 · 2 comments · May be fixed by #457

Comments

@aarondill
Copy link

aarondill commented Dec 6, 2022

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

@aarondill aarondill linked a pull request Dec 6, 2022 that will close this issue
@paulej
Copy link

paulej commented Dec 11, 2022

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.

@aarondill
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants