baryshev / ect

Fastest JavaScript template engine with embedded CoffeeScript syntax
http://ectjs.com
MIT License
626 stars 70 forks source link

Comments in ECT. #31

Closed ghost closed 11 years ago

ghost commented 11 years ago

Vadim,

I there a way to leave a comment in a .ect file? I cant find any documentation about that.

Example:

<% /* my comment */ %>
or
<% // my comment %>
baryshev commented 11 years ago

You can use html-comments outside of ECT control tags.

<!-- my comment -->

If you need to leave a comment inside of multiline ECT expression, you can use coffee-script comments:

<%
@test = 1
# @test = 2 just a comment
%>
<%- @test %>