Skip to content

Conversation

@lynaghk
Copy link

Without a semicolon, JavaScript evaluates

a = b + c (d + e).print() 

as

a = b + c(d + e).print(); 

rather than

a = b + c; (d + e).print(); 

This commit prevents that from happening by defensively adding a semicolon when joining JavaScripts.

@dnsco
Copy link

is this going to get merged? we occasionally have issues resulting from concatenation.

@dougcole
Copy link

This seems really valuable - is anything holding this up?

@andrewhao
Copy link

What compressors are you all using? By explicitly requiring Closure Compiler this issue went away for me (methinks JSMin uses a naive compression algorithm?).

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@lynaghk@dnsco@dougcole@andrewhao