Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions jquery.markup.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,14 @@
function (txt) { /* global jade: true */ return jade.compile(txt); });

/* Mustache (efficient: pre-compilation, complete: data support) */
reg("mustache", "Mustache", "http://mustache.github.io/", "Mustache.compile",
function (txt) { /* global Mustache: true */ return Mustache.compile(txt); });
reg("mustache", "Mustache", "http://mustache.github.io/", function () { return isfn("Mustache.parse") && isfn("Mustache.render"); },
function(txt) { /* See https://github.com/janl/mustache.js/issues/346#issuecomment-29764332 for more information. */
Mustache.parse(txt);
return function (view, partials) {
return Mustache.render(txt, view, partials);
};
}
);

/* Walrus (efficient: pre-compilation, complete: data support) */
reg("walrus", "Walrus", "http://documentup.com/jeremyruppel/walrus/", "Walrus.Parser.parse",
Expand All @@ -384,8 +390,8 @@
function (txt) { /* global fmt: true */ return fmt(txt); });

/* Hogan (efficient: pre-compilation, complete: data support) */
reg("hogan", "Twitter Hogan", "http://twitter.github.io/hogan.js/", "hogan.compile",
function (txt) { /* global hogan: true */ var tmpl = hogan.compile(txt);
reg("hogan", "Twitter Hogan", "http://twitter.github.io/hogan.js/", "Hogan.compile",
function (txt) { /* global hogan: true */ var tmpl = Hogan.compile(txt);
return function (data) { return tmpl.render(data); }; });

/* Underscore Template (efficient: pre-compilation, complete: data support) */
Expand Down