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

Comment not recognized on the first character of file #531

Open
onesome88 opened this issue Aug 8, 2024 · 1 comment
Open

Comment not recognized on the first character of file #531

onesome88 opened this issue Aug 8, 2024 · 1 comment

Comments

@onesome88
Copy link

It appears that if a one-character comment starts at the first character of a file, it is not recognized.
Languages like python are affected, since python's comments are only a single character long.
I only tested python and jsonc, issue may exist on other languages too.
Image:
image
Thanks in advance!

@xp-dv
Copy link

xp-dv commented Sep 13, 2024

Great breakdown. This is the exact problem I am running into as well. I like to use the * tag to highlight the first line of my python files to act as a bolded document title. Any temporary or permanent solution would be welcome.

Edit:
#61 seems to be the reason for it. @aaron-bond states that he made the change to prevent first line #!/bin/bash coloring, but did not make it user-configurable. It took Aaron 10 months to respond to a PR from the official VS-Code team (#351), so I'm not counting on a better implementation of #!/bin/bash ignoring in this extension. It seems the only solution is just to switch to the fork https://github.com/edwinhuish/better-comments-next.

Edit 2:
Never mind, better-comments-next is more of a compromise than a solution as it now forces you to put a space in between the tag and the comment indicator (ex: //* Highlighted comment must now be // * Highlighted comment) as described in edwinhuish#2. This is not a solution I am interested in. I would much rather have the option to create tag exceptions than be forced to edit every single file I've ever committed to now have a space in-between // and the tag.

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

No branches or pull requests

2 participants