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

template literals and handling of missing semi-colons #676

Open
futtta opened this issue Jul 12, 2020 · 3 comments
Open

template literals and handling of missing semi-colons #676

futtta opened this issue Jul 12, 2020 · 3 comments

Comments

@futtta
Copy link

futtta commented Jul 12, 2020

When normal JS vars are on separate lines with missing semi-colons, they are left on separate lines, but when using template literals the line-break is removed resulting in broken JS.

JS in;

// template literals without semicolons
var foo = `Hello`
foo = `world`

// template literals with semicolons
var foo = `Hello`;
foo = `world`;

// Simple strings without semicolons
var foo = 'Hello'
foo = 'world'

JS out:

var foo=`Hello`foo=`world`var foo=`Hello`;foo=`world`;var foo='Hello'
foo='world';
@glensc
Copy link
Collaborator

glensc commented Jul 12, 2020

you are reporting to the wrong project. I think you need to report "mrclay/jsmin-php":

@futtta
Copy link
Author

futtta commented Jul 12, 2020

Yes and no; it was already reported over a year ago but got not response. As minify uses jsmin-php and as both are by the same original author and as there is more activity here, I hoped reporting in miniy would result in someone seeing it. That, at least, has been accomplished. Would appreciate your help! :-)

@glensc
Copy link
Collaborator

glensc commented Jul 12, 2020

I don't think neither of them is active. but I can accept your pull request, or pull request to add support for some other minifier library :P

and you should cross-link that other PR here and included your secret agenda in issue details that you found no luck there.

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

2 participants