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

Support for single line comments for JSX/TSX elements #6832

Closed
idr4n opened this issue Apr 20, 2023 · 2 comments
Closed

Support for single line comments for JSX/TSX elements #6832

idr4n opened this issue Apr 20, 2023 · 2 comments
Labels
C-enhancement Category: Improvements

Comments

@idr4n
Copy link

idr4n commented Apr 20, 2023

This was mainly described in #5453, which was closed based on block comments not being supported. However, I think the main issue is that even for single line comments, JSX elements use a different style of comments.

That is, if I want to comment even one single line in JSX/TSX elements, the comment style should be {/* ... */}, and for the rest of the file (simple JS or TS elements) it should be // as it is currently implemented.

Thanks in advance!

@idr4n idr4n added the C-enhancement Category: Improvements label Apr 20, 2023
@pascalkuthe
Copy link
Member

pascalkuthe commented Apr 20, 2023

blocks comments are any comments that include text that is not inserted immidietly at the start of the line so this was correctly closed as a duplicate of #1505. JSX and TSX are implemented as injections so this should work automatically as soon as block comment support is available and the comment style is updated in languages.toml.

This feature is being implemented in #4718 which @gabydd plans to finish once he has more time afaik.

@pascalkuthe pascalkuthe closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2023
@gabydd
Copy link
Member

gabydd commented Apr 20, 2023

Yeah I was looking at #1937 recently so I need to reconsider the block comment config to support this as well. I might work on it today actually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

3 participants