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

Literal Arrays in :each statements don't work #1

Closed
pjb3 opened this issue Feb 3, 2010 · 3 comments
Closed

Literal Arrays in :each statements don't work #1

pjb3 opened this issue Feb 3, 2010 · 3 comments

Comments

@pjb3
Copy link

pjb3 commented Feb 3, 2010

This doesn't compile the each expression into a function

haml.compile(":each n in [1, 2, 3]\n  = n")

this does:

haml.compile("- ns = [1, 2, 3]\n:each n in ns\n  = n")
@pjb3
Copy link
Author

pjb3 commented Feb 3, 2010

Whoops, wrong repo

@creationix
Copy link
Owner

Yeah, the regex is looking for variables, not expressions. Haml-js isn't a real compiler with a full parser, it's a like-by-line translator. I can probably expand the regular expression to allow for more generic expressions as the source array.

@creationix
Copy link
Owner

oops, you're right, wrong repo.

creationix pushed a commit that referenced this issue Dec 20, 2011
Did some copy-editing of promises article.
creationix pushed a commit that referenced this issue May 23, 2016
Made Debian install instructions more clear
This issue was closed.
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