Skip to content

Instantly share code, notes, and snippets.

@gnepud
Last active October 6, 2015 18:58
Show Gist options
  • Save gnepud/3038589 to your computer and use it in GitHub Desktop.
Save gnepud/3038589 to your computer and use it in GitHub Desktop.
Backbone.js use mustashe syntax
_.templateSettings = {
evaluate: /\{\{#([\s\S]+?)\}\}/g, // {{# console.log("blah") }}
interpolate: /\{\{[^#\{]([\s\S]+?)[^\}]\}\}/g, // {{ title }}
escape: /\{\{\{([\s\S]+?)\}\}\}/g, // {{{ title }}}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment