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

Feat: removeAttributeQuotes #104

Merged
merged 1 commit into from
Oct 13, 2020
Merged

Conversation

SukkaW
Copy link
Contributor

@SukkaW SukkaW commented Oct 12, 2020

Closes #6

Implement a module that will be able to access and modify tree.options.quoteAllAttributes.

Notice it is not safe to changing tree.options directly (although PostHTML Team doesn't think so). I have already discussed it with PostHTML Team (posthtml/posthtml#335). There should be a better approach.

@@ -26,6 +26,7 @@ export default {
removeEmptyAttributes: true,
removeRedundantAttributes: false,
removeComments: 'safe',
removeAttributeQuotes: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the feature is safe to enable (won't break anything), but it requires a completely rewritten for every existing unit test cases.

Since html-minifier doesn't enable the feature by default, I make it disabled in safe presets as well.

@maltsev maltsev merged commit ab1eef0 into posthtml:master Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove attribute quotes
2 participants