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

Normalize whitespaces inside attributes #25

Closed
maltsev opened this issue Feb 22, 2016 · 3 comments
Closed

Normalize whitespaces inside attributes #25

maltsev opened this issue Feb 22, 2016 · 3 comments

Comments

@maltsev
Copy link
Member

maltsev commented Feb 22, 2016

<a href="#" class="class1 class2 " rel=" external nofollow ">link</a>
->
<a href="#" class="class1 class2" rel="external nofollow">link</a>

@stevenvachon, thanks for the idea!

@stevenvachon
Copy link

Np. It's important to reiterate here that such attributes should be limited to only those containing space-separated lists. We wouldn't want to normalize something literal like:

<tag title="term:  value\nterm1: value">

Something that might help is link-types. I have some more testing to do in order to see if browsers accept characters other than just a regular breaking space.

@maltsev
Copy link
Member Author

maltsev commented Sep 13, 2018

For now I only implemented class,rel, and ping minification as collapseAttributeWhitespace module. I'm going to release it in version 0.2.0.

@maltsev maltsev closed this as completed Sep 13, 2018
maltsev added a commit that referenced this issue Sep 13, 2018
Actually, this list has been added by mistake.
@maltsev
Copy link
Member Author

maltsev commented Sep 14, 2018

Released: 0.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants