-
-
Notifications
You must be signed in to change notification settings - Fork 18
Add support for keeping tags unquoted. #30
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting PR.
This feature looks good to me, just need to see the mentioned tests.
This reduces the size of the HTML and improves readability. The current default behaviour is kept the same but an option is provided to enable the new behaviour. On a future version bump I would flip the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
I was implementing this so that it could be used by htmlnano. It seems to me that currently posthtml-render has no way to allow emit this syntax which htmlnano would want. While in my case I am doing this for minification I would also argue that this syntax is more readable and some people would prefer to have it even when not doing minification. |
Yeah, omitting these kinds of behavior can not be done by the plugin as of now. Will merge this after one more approval 👍 |
Thinking about it a bit more htmlnano doesn't currently do any modification to the formatting of the HTML, only modification of the AST. Since this change doesn't affect the AST at all it makes even more sense in the renderer than it does in htmlnano. |
After merging this, I think it should be added in htmlnano's docs as well about this options 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx
This reduces the size of the HTML and improves readability.
The current default behaviour is kept the same but an option is provided
to enable the new behaviour. On a future version bump I would flip the
default value.
Notable Changes
Commit Message Summary (CHANGELOG)
Type
SemVer
It depends what guarantees about the output are provided. This is probably minor as documented but is very likely to break some downstream tests so should probably be treated as a major change.
Checklist