I suspected the browser might be tidying up a bit - that makes sense,
thanks. I'm leaning towards a solution using sub-templates - because I
need to include more complex markup within the DT's, and I don't want
that going into the directives.
Can you tell me if .compile will accept multiple nodes, or only one?
I'm using jQuery, and would like to do something like the following to
produce a set of sub-template chunks:
$('.subTemplate').children().compile(directives);
where .subTemplate is something like:
<div class="subTemplate">
<dt></dt>
<dd></dd>
</div>
I can see that providing a collection like .children is pretty jQuery
specific, and not something you'd design for. Can you think of an easy
way to make that work? Is it possible to pass in .subTemplate, then
strip it out at compile time?
I'll have a dig around in pure - see if I can work out what's going on
in there. Any thoughts you can provide are much appreciated!
Cheers
I'm working on a 'wrapped' argument which will tell .compile() to
strip the outermost node out of the template - that should do the job.
I'll try to implement it as a plugin so you can have a look.
Thanks again - I'm really enjoying working with PURE.