-
Notifications
You must be signed in to change notification settings - Fork 6
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
dont work if url in script #13
Comments
You may be using an outdated version of the module. When I minify your example with fresh module install from CPAN, it comes out fine: perl -MJavaScript::Minifier -wlE '
say "Using module version " . $JavaScript::Minifier::VERSION;
say "Minified code: " . minify(input => q|if (item) { let copyText = "https://www.xxx.com/index.html?itemno="+item.value; navigator.clipboard.writeText(copyText); } |);
'
Using module version 1.16
Minified code: if(item){let copyText="https://www.xxx.com/index.html?itemno="+item.value;navigator.clipboard.writeText(copyText);} |
JavaScript::Minifier
|
Hello,
JavaScript::Minifier
…-------------------------------------------------------------------------
(no description)
Z/ZO/ZOFFIX/JavaScript-Minifier-1.16.tar.gz
/usr/local/share/perl/5.34.0/JavaScript/Minifier.pm
Installed: 1.16
CPAN: 1.16 up to date
Von: Zoffix Znet ***@***.***>
Gesendet: Sonntag, 26. Mai 2024 17:24
An: zoffixznet/JavaScript-Minifier ***@***.***>
Cc: arnold-b ***@***.***>; Author ***@***.***>
Betreff: Re: [zoffixznet/JavaScript-Minifier] dont work if url in script (Issue #13)
You may be using an outdated version of the module. When I minify your example with fresh module install from CPAN, it comes out fine:
perl -MJavaScript::Minifier -wlE '
say "Using module version " . $JavaScript::Minifier::VERSION;
say "Minified code: " . minify(input => q|if (item) { let copyText = "https://www.xxx.com/index.html?itemno="+item.value; navigator.clipboard.writeText(copyText); } |);
'
Using module version 1.16
Minified code: if(item){let copyText="https://www.xxx.com/index.html?itemno="+item.value;navigator.clipboard.writeText(copyText);}
—
Reply to this email directly, view it on GitHub <#13 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AH2N3WNCXHLXZ2CPOKLS4TLZEH5CLAVCNFSM6AAAAABIGDWPMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZSGI2TQMZRHA> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AH2N3WJSL6QYIJF376WZ4H3ZEH5CLA5CNFSM6AAAAABIGDWPMWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTT7C6XA4.gif> Message ID: ***@***.*** ***@***.***> >
|
What output do you get when you run this code snippet:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
just try this to minify
if (item) { let copyText = "https://www.xxx.com/index.html?itemno="+item.value; navigator.clipboard.writeText(copyText); }
after // the minifier will cut all because he interpret this as comment
minify result: let copyText = "https:navigator.clipboard.writeText(copyText);}}
The text was updated successfully, but these errors were encountered: