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

putting inline javascript under :each breaks #55

Open
lashd opened this issue Dec 9, 2011 · 1 comment
Open

putting inline javascript under :each breaks #55

lashd opened this issue Dec 9, 2011 · 1 comment

Comments

@lashd
Copy link

lashd commented Dec 9, 2011

example:

:each question in questions

  • var temp = 'hello'

Browser reports: missing ) after argument list

And the following is logged to the console

with (locals || {}) {
    try {
        var _$output = (function () {
            var __result__ = [], __key__, question;
            for (__key__ in questions) {
                if (questions.hasOwnProperty(__key__)) {
                    question = questions[__key__];
                    __result__.push("";
                    var temp = 'hello';
                    _$output = _$output
                )
                    ;
                }
            }
            return __result__.join("");
        }).call(this);
        return _$output;
    } catch (e) {
        return "\n<pre class='error'>" + html_escape(e.stack) + "</pre>\n";
    }
}
ilich pushed a commit to ilich/haml-js that referenced this issue Dec 24, 2011
ilich pushed a commit to ilich/haml-js that referenced this issue Dec 24, 2011
@ilich
Copy link

ilich commented Dec 24, 2011

The issue has been fixed. 349ede1

See the unit-test js_after_each.haml for further information.

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