-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
HTML formatter sends comments to a new line when the comment does not include a space as the first character #1823
Comments
This looks similar to #1301, but it is not the same. |
This problem is even more apparent if for something like:
Which turns into:
This adds space between |
I would like to work on this @avigoldman @aashigupta19 |
@cfya |
Hi! I have a project for a software methodology class to contribute to an open source repo and I am very interested in working on this project. Could I be assigned to this issue? Thanks! |
@carolinekistler There you go, if you have any questions please join the project gitter.im room . |
To clarify, I think the requested behavior is that the following input remains unchanged:
|
Description
The HTML formatter sends comments to a new line when the comment does not include a space as the first character. It works properly when the HTML comment starts with any white space character. I believe the issue is here: https://github.com/beautify-web/js-beautify/blob/master/js/src/html/beautifier.js#L698
Related issues: #1337 #426
Input
The code looked like this before beautification:
Expected Output
The code should have looked like this after beautification:
Actual Output
The code actually looked like this after beautification:
To have this function properly add a space at the start of the second comment.
Input
The code looked like this before beautification:
Actual Output
The code actually looked like this after beautification:
Environment
I tested this on beautifier.io
Settings
The text was updated successfully, but these errors were encountered: