Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
nfm opened this Issue · 3 comments

2 participants

@nfm
Collaborator
nfm commented

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.

@netzpirat
Owner

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

@netzpirat
Owner

New release 0.9.5 is out that fixes this issue.

@netzpirat netzpirat closed this
@nfm
Collaborator
nfm commented

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
Something went wrong with that request. Please try again.