twigkit/tempo — Issue #42: Template creates unwished "\n" Nodes
Author: Kokuswolf
Created: 2011-12-21 16:59:42+00:00
State: open

As I take time to use this nice js-template engine instead of create Elements on my self with jQuery, I found some strange behavior. Lets say, this is the template:

{{foo}}

{{bar}}

{{baz}}

I can't explain why, but if a Browser renders this directly in HTML everthing is fine. If its rendered with Tempo, some space is generated between each element. If the CSS-Rules "float:left" or "display:inline-block" is used on these "li"s, the space become visible - but only if rendered with Tempo.

I tried the Development-Tools in Chrome, Dragonfly in Opera and Firebug in Firefox to figure out why, but the Dom-tree seems to be the same, the visible result not. After I tried this, the space disappears:

{{foo}}
{{bar}}
{{baz}}

My conclusion is, that the generated "\n"-Nodes after each Element produces this strange space. It's difficult to explain this with my broken english, but i tried. It would be loveful to see you hunting this bug. I slowly become a Fan of you engine. :)