Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

putting inline javascript under :each breaks #55

Open
lashd opened this Issue · 1 comment

2 participants

@lashd

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 ilich referenced this issue from a commit in ilich/haml-js
iverbitskiy@yahoo.com Issue #55. Fixed inline JavaScript under :each break 8c50210
@ilich ilich referenced this issue from a commit in ilich/haml-js
iverbitskiy@yahoo.com Issue #55. Fixed inline JavaScript under :each break 349ede1
@ilich

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