I do not know that this is specific to the requsjs handlebar plugin, but when I have a template: <> If a condition is false then I get an empty line like i: no more Is this expected behavior? I want to get recurring lines without string manipulation after the template compilation. I know the lines are ignored in HTML but this can be particularly troubling in the loop. If you see new placements in your code: You can see that if the first condition is false, then the code without the left branch is: which gives you two new lines in one line. pre & lt; H1 & gt; ABC & lt; / H1> {{#if testcondition1}} & lt; H1 & gt; Df & lt; / H1> {{/ If}} {{#if testcondition2}} & lt; H1 & gt; Ghi & lt; / H1> {{/ If}} & lt; H1 & gt; Xyz & lt; / H1>
& lt; H1 & gt; ABC & lt; / H1> & Lt; H1 & gt; GHI & lt; / H1> & Lt; H1 & gt; Xyz & lt; / H1>
& Lt; H1 & gt; ABC & lt; / H1> \ N {{#if testcondition1}} \ n & lt; H1 & gt; Df & lt; / H1> \ N {{/ If}} \ n {{# testcondition2}} \ n & lt; H1 & gt; Ghi & lt; / H1> \ N {{/ if}} \ n & lt; H1 & gt; Xyz & lt; / H1> \ N
No comments:
Post a Comment