Skip to content

Conversation

lynaghk
Copy link

@lynaghk lynaghk commented Jan 18, 2012

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

dnsco commented Feb 28, 2012

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 free to 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