0

Using eco template I form follow code:

<% if @is_completed : %>
   <span class="label">completed</span>
<% end %>

But after rendering I see some artifacts in my code:

<div class="large-3 columns">
    <span class="label">
        completed
    </span>
    "9"
</div>

p.s.

I've tried to mark my code by characters "a", "b", "c", ... :

<div class="large-3 columns">a
    b<% if @is_completed: %>c
        d<span class="label">e
            completed
         f</span>g
    h<%end%>i
j</div>

And here is what I've seen >>> h 9 i:

<div class="large-3 columns">"abcd"
    <span class="label">
        e completed f
    </span>
    "gh9ij"
</div>

But the numbers are different? Not only "9".

What's wrong?

4

1 回答 1

0

大家好,

首先,我很抱歉,因为一开始我在Stackoverflow找不到类似的问题。

其次,我知道答案。

存在同样的问题: Eco 模板在使用 'end' 语句时呈现整数

@Phoeniks告诉安装 node.js 可以解决这个问题。这是真的。但我必须补充他。您应该在“路径”的环境变量中指定 Node.js 的路径。

感谢大家。

于 2014-07-01T06:17:31.937 回答