adammark/Markup.js

Bug, or mis-use?

fatpeter55 opened this issue · 2 comments

Hi,

Cool plugin :) Just trying to get it working, but I'm having some issues with even a basic setup:

The template is inside the HTML (before my script);

`<script type="text/template" id="social_flex_template">

Name:
Link:

Remove
</script>`

Then the JS:

var social_template = document.getElementById("social_flex_template").firstChild.textContent; var to_add = Mark.up(social_template,{ foo: 'bar' });

However, I get a big fat error when trying to run that code:

TypeError: e.iter is undefined
...up(a,b,e),h)}else{if(d.indexOf("#")>-1){e.iter.sign=d;k=this._pipe(e.iter,h)}els...

I'm at a bit of a loss, as I'm pretty sure I've configured it as per the docs. Any ideas?

TIA

Andy

Eugh, was me being stupid as using {{#}} outside of a loop. Removed that, and it works now :)

Yep—good catch.