mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
Upgrade handlebars from 1.0.9 to 1.0.11.
There were some notable bug fixes between those versions. We are still far behind the current version (1.3.0). For the node stuff, I used npm update. Then for static/third/handlebars/handlebars.runtime.js, I copied the node version then added back the copyright. (imported from commit 59bcd2c52540ff88bba2f90cced809cfcb8cd92b)
This commit is contained in:
committed by
Waseem Daher
parent
2504baf783
commit
4c3d22baf5
18
node_modules/handlebars/global-test.js
generated
vendored
Normal file
18
node_modules/handlebars/global-test.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
var Handlebars = require('./lib/handlebars');
|
||||
|
||||
Handlebars.registerHelper('test_helper', function() { return 'found it!' });
|
||||
Handlebars.registerPartial('global_test', '{{another_dude}}');
|
||||
|
||||
//var template = Handlebars.compile('{{test_helper}} {{#if cruel}}Goodbye {{cruel}} {{world}}!{{/if}}');
|
||||
var template = Handlebars.precompile("Dudes: {{#if foo}} {{#if nested}} {{> shared/dude}} {{/if}} {{> global_test}} {{/if}}");
|
||||
console.log(template);
|
||||
|
||||
return;
|
||||
|
||||
console.log(
|
||||
template({cruel: "cruel", name:"Jeepers", another_dude:"Creepers"}, {
|
||||
helpers: {world: function() { return "world!"; }},
|
||||
partials: {'shared/dude':"{{name}}"}
|
||||
}));
|
||||
|
||||
console.log(template);
|
||||
Reference in New Issue
Block a user