Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
root = true

[*.cr]
[*.{cr,ecr}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
Expand Down
2 changes: 1 addition & 1 deletion spec/std/data/test_template3.ecr
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<%- 2.times do |i| %><%= i %><% end -%>
<%- 2.times do |i| %><%= i %><% end -%>
2 changes: 1 addition & 1 deletion spec/std/data/test_template4.ecr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
hi
<%- 2.times do |i| %><%= i %><% end -%>
<%- 2.times do |i| %><%= i %><% end -%>
2 changes: 1 addition & 1 deletion spec/std/data/test_template6.ecr
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<%= "string with -%" %>
<%= "string with -%" %>
2 changes: 1 addition & 1 deletion spec/std/data/test_template7.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Greetings, <%%= @name %>!
<%-% else -%>
Greetings!
<%-% end -%>
<%-% end -%>
3 changes: 2 additions & 1 deletion spec/std/ecr/ecr_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe "ECR" do
it "does with -% inside string" do
io = IO::Memory.new
ECR.embed "#{__DIR__}/../data/test_template6.ecr", io
io.to_s.should eq("string with -%")
io.to_s.should eq("string with -%\n")
end

it "does with <%% %>" do
Expand All @@ -74,6 +74,7 @@ describe "ECR" do
<%- else -%>
Greetings!
<%- end -%>

ECR
end

Expand Down