This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/helpers/raw.js.es6
2014-12-17 09:31:41 -05:00

11 lines
366 B
JavaScript

import registerUnbound from 'discourse/helpers/register-unbound';
registerUnbound('raw', function(templateName, params) {
var template = Discourse.__container__.lookup('template:' + templateName + '.raw');
if (!template) {
Ember.warn('Could not find raw template: ' + templateName);
return;
}
return new Handlebars.SafeString(template(params));
});