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

Bug: sortAttributesWithLists breaks <img sizes="(min-width: 300px) 200px, 100px"> #180

Closed
mischnic opened this issue Apr 1, 2022 · 0 comments · Fixed by #181
Closed

Comments

@mischnic
Copy link

mischnic commented Apr 1, 2022

const htmlnano = require("htmlnano");

htmlnano
    .process(
        `
<img sizes="(min-width: 300px) 200px, 100px">`,
        {
            minifyCss: false,
            sortAttributesWithLists: false,
        }
    )
    .then(function (result) {
        console.log(result.html);
    })
    .catch(function (err) {
        console.error(err);
    });

Wrong Output with sortAttributesWithLists enabled: <img sizes="(min-width: 100px 200px, 300px)">
Output with sortAttributesWithLists disabled: <img sizes="(min-width: 300px) 200px, 100px">

SukkaW added a commit to SukkaW/htmlnano that referenced this issue Apr 1, 2022
SukkaW added a commit to SukkaW/htmlnano that referenced this issue Apr 1, 2022
maltsev added a commit that referenced this issue Apr 2, 2022
Fix(#180): exclude "sizes" from attributesWithLists
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 a pull request may close this issue.

1 participant