Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nfm opened this issue Jun 8, 2012 · 3 comments
Closed

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

nfm opened this issue Jun 8, 2012 · 3 comments

Comments

@nfm
Copy link
Collaborator

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.

@netzpirat
Copy link
Collaborator

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

@netzpirat
Copy link
Collaborator

New release 0.9.5 is out that fixes this issue.

@nfm
Copy link
Collaborator Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants