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

bug: dangling comment block #6

Open
JSerZANP opened this issue May 20, 2023 · 2 comments
Open

bug: dangling comment block #6

JSerZANP opened this issue May 20, 2023 · 2 comments
Assignees
Labels
bug Something isn't working wip

Comments

@JSerZANP
Copy link
Owner

Screenshot 2023-05-20 at 22 07 09

for comment block /* */ there is a dangling issue, especially for language like CSS/HTML

@JSerZANP JSerZANP added the bug Something isn't working label May 20, 2023
This was referenced May 30, 2023
@JSerZANP JSerZANP self-assigned this Jun 18, 2023
@JSerZANP JSerZANP added the wip label Jun 18, 2023
@Seven-Y-Q-Guo
Copy link

Seven-Y-Q-Guo commented Feb 15, 2024

Hi @JSerZANP , I have an idea on resolving this issue:
Transform below codes

const blog = "https://jser.dev"
/*                    ^
       [JSer.dev is the *homepage* for JSer.]
       [Check it out! [jser.dev](https://jser.dev)]
*/
// This is a normal comment

into

const blog = "https://jser.dev"
//                    ^
//       [JSer.dev is the *homepage* for JSer.]
//       [Check it out! [jser.dev](https://jser.dev)]
// This is a normal comment

We can simply check the first content for each line, as I see another usage which looks like {/* [This is line 2] */} always has { as first content.
Once we have met /* we can add // before each content between /* and */, then remove */ to avoid unnecessary new line

My PR: #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wip
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants