Interpolation followed by an & causes an ExecJS::ProgramError #47

nfm opened this Issue Jun 8, 2012 · 3 comments


None yet

2 participants

nfm commented Jun 8, 2012

Hi there,

New to haml_coffee_assets so please forgive me if I'm doing something dumb.

The following interpolation with a .hamlc file causes an error:

%a{ href: "/people?name=#{@name}&page=4" }

Error is:

Uncaught Error: ExecJS::ProgramError: missing ', starting on line $LINE_NUMBER

Changing the href to omit the ampersand after the interpolation prevents the error, as does using + to concatenate strings:

%a{ href: "/people?name=#{@name}page=4" }

%a{ href: "/people?name=" + @name + "&page=4" }

Seems like an ampersand directly after the interpolation is the cause of the error, but I'm not sure exactly why.

Cheers :)

Edit: I'm using haml_coffee_assets 0.9.4.


Thanks for reporting. This is fixed in haml-coffee, will release a new haml_coffee_assets gem asap.


New release 0.9.5 is out that fixes this issue.

@netzpirat netzpirat closed this Jun 8, 2012
nfm commented Jun 9, 2012

Wow, that was super fast, thanks! Loving haml_coffee_assets too :)

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