You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling a coffee script file with TextMate (Compile and Display JS) gives a different result compared to compiling with coffee on the command line. This happens if I insert raw javascript with backticks and the javascript code is invalid. For example:
<% if @autoload %>
The above will be compiled into an empty expression ending with a semicolon.
The text was updated successfully, but these errors were encountered:
No I meant <% if @autoload %> and I see now that the backticks are not displayed. I'm inserting Ruby on Rails template code and compiling the CoffeeScript file to a Ruby on Rails JavaScript template file (.js.erb). This is working fine using the command line but not in TextMate. I think it's the <% and %> that is causing the problem.
Gotcha. The command was using TextMate's "Display as HTML" ability, and wasn't escaping angle brackets in the output. Here's a patch that should fix your problem:
Compiling a coffee script file with TextMate (Compile and Display JS) gives a different result compared to compiling with coffee on the command line. This happens if I insert raw javascript with backticks and the javascript code is invalid. For example:
<% if @autoload %>
The above will be compiled into an empty expression ending with a semicolon.
The text was updated successfully, but these errors were encountered: