Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Concatenate JavaScripts with semicolon. #217

wants to merge 1 commit into


None yet
4 participants

lynaghk commented Jan 18, 2012

Without a semicolon, JavaScript evaluates

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


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.

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

This seems really valuable - is anything holding this up?

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