putting inline javascript under :each breaks #55

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

Comments

Projects
None yet
2 participants

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 commented Dec 24, 2011

The issue has been fixed. 349ede1

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

@lashd lashd referenced this issue in dharanasoft/haml-sprockets Dec 11, 2011

Closed

haml-js seems to have a problem with javascript under :each #4

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