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

Feature: Would be nice to have a way of preserving empty attributes #446

Closed
POFerro opened this issue Aug 4, 2021 · 2 comments
Closed
Assignees

Comments

@POFerro
Copy link
Contributor

POFerro commented Aug 4, 2021

Hi,

With current available options an html document read with hap and written back has all empty attributes written with empty string.
This is quite annoying for cases like <input required /> or angular directives like <button mat-button></button>.

Would be nice to have an option in document to preserve these empty attributes and write them the same way as read.
This property of attribute would of course be set to false if the attribute gets a value set :).

Thanks
POFerro

@JonathanMagnan
Copy link
Member

Hello @POFerro ,

As said in your pull request, it has been refused since that was already possible (had a bug) with the following option:

d.GlobalAttributeValueQuote = AttributeValueQuote.Initial;

Which keeps the original quote value (double quote, single quote, no quote, and now no value).

Let me know if that was exactly what you were looking for.

Best Regards,

Jon

@POFerro
Copy link
Contributor Author

POFerro commented Aug 10, 2021

Thanks @JonathanMagnan , everything works like a charm.
Thanks for the mention in the release I was flattered :).

@POFerro POFerro closed this as completed Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants