My html file looks like
<% for (var i = 0, l = props.length; i < l; ++i) {
var _name = props[i][0];
var _value = props[i][1]; %>
<p>
<span class="prop"><%=_name%>: </span><span class="value"><%=_value%></span>
</p>
<% } %>
I get a html parse error in the for loop.
Warning: Command failed: /Users/xx/xx/xxxxx/node_modules/html-minifier/dist/htmlminifier.js throw 'Parse Error: ' + html; ^ Parse Error:
I don't know what the even means. I checked at the props array it is giving me the correct data.
props = [["a","b"],["c","d"],["e","f"]]
The html does give correct values when i print them out static.
<p>
<span class="prop"><%=props[0][0]%>: </span><span class="value"><%=props[0][1]%></span>
</p>
<p>
<span class="prop"><%=props[1][0]%>: </span><span class="value"><%=props[1][1]%></span>
</p>
<p>
<span class="prop"><%=props[2][0]%>: </span><span class="value"><%=props[2][1]%></span>
</p>
This gives me the required result.
But i want to know how to fix the parse error in the for loop.