Closed stevenbarragan closed 8 years ago
try double quotes around your attributes instead of single quotes; that fixed it for me
I really want to use single quote because haml-lint gem, which uses rubocop syntax checker, warns about it.
RuboCop: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Same problem here using single quotes. Using double quotes fixes the issue, but that's not an option for me.
Same issue here,
after investigation (I'm using gulp-haml), when render
is called, escaperName
is undefined
.
A quick fix is to add escaperName = "html_escape";
in the render function or to the variable declaration.
@soyuka
Ahh, I understand. This library seems to support only JSON in attributes.
https://github.com/creationix/haml-js/blob/master/lib/haml.js#L27
I think automatically replacing '
to "
(of course "
s inside of it too) if possible will be better for performance. Then skip parse_interpol
.
Just adding single quote test doesn't cause the exception (still not optimized js is generated). It might be issue on gulp side.
This project seems to be discontinued, isn't it? @aaronblohowiak
Does somebody has any idea about what could be causing this error?