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

minify-html-onepass can't handle &< #146

Open
mattfbacon opened this issue Apr 30, 2023 · 0 comments
Open

minify-html-onepass can't handle &< #146

mattfbacon opened this issue Apr 30, 2023 · 0 comments

Comments

@mattfbacon
Copy link

mattfbacon commented Apr 30, 2023

The following MRE causes the following error:

&<a
fn main() {
    let mut bytes = *b"&<a";
    let res = minify_html_onepass::with_friendly_error(
        &mut bytes,
        &minify_html_onepass::Cfg {
            minify_js: true,
            minify_css: true,
        },
    );
    let res = res.unwrap_err();
    dbg!(res.position);
    dbg!(res.message);
    println!("{}", res.code_context);
}
[src/main.rs:11] res.position = 10
[src/main.rs:12] res.message = "Unexpected end of source code."
1|&<ap;&l&<a
>|          ^
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

No branches or pull requests

1 participant