-
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 <!-- comments --> placed within text alters whitespace #1301
Comments
I'm having the same issue here. |
I want to work on this issue, Can you assign me? |
@abhishek-kumar-91 No, I will not assign. But you should feel free to work on this. |
@bitwiseman can I work on this issue? |
Yes. |
For example, instead of using regular space characters, you can use HTML entity to represent the whitespace. This way, when the HTML comments are beautified, the whitespace will be preserved. <p>
This is some text with an HTML comment:
<!-- This is a comment -->
</p> |
@serhiyupw |
Description
When HTML comments are beautified, it removes the whitespace surrounding the comment. This is problematic if the HTML comments occur within text blocks such as paragraphs.
Input
When a comment exists inside a text block:
Expected
Ideally, I would like comments to always be ignored wherever they occur, like so:
Actual
The problem with the above is the removal of the space following
Hello
like so:Settings
Example:
Note
I'm aware that I could use:
But this doesn't strike me as an ideal solution. I think it would be better if there was an option to ignore comment tags specifically.
The text was updated successfully, but these errors were encountered: