Skip to content

Instantly share code, notes, and snippets.

@cfurrow
Created January 19, 2011 01:35
Show Gist options
  • Save cfurrow/785522 to your computer and use it in GitHub Desktop.
Save cfurrow/785522 to your computer and use it in GitHub Desktop.
var source = " <p>If you'd like to filter by your custom-defined ids, select them below.</p>";
source += " <ul class='clusters'>";
source += " {{#clusters}}";
source += " <li class='cluster' data-ids='{{ids}}'>";
source += " {{name}}";
source += " </li>";
source += " {{/clusters}}";
source += " </ul>";
var template = Handlebars.compile(source);
var data = { clusters:[
{name:"group1", ids:"1,2,3,4,5"},
{name:"group2", ids:"6,7,8,9,0"}
]};
var html = template(data);
/* error as follows:
*
*
Parse error on line 1:
... <p>If you'd like to filter by your custom-defined ids, select them below.
---------------------------------------------------------^
Expecting 'EOF', 'CONTENT', 'COMMENT', 'OPEN_BLOCK', 'OPEN_INVERSE', 'OPEN_ENDBLOCK', 'OPEN', 'OPEN_UNESCAPED', 'OPEN_PARTIAL'
*
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment