2018-01-27 16:12:06 +09:00
|
|
|
import { _ } from 'meteor/underscore';
|
|
|
|
|
|
|
|
// As identified in issue #9149, when an application overrides the default
|
|
|
|
// _.template settings using _.templateSettings, those new settings are
|
|
|
|
// used anywhere _.template is used, including within the
|
|
|
|
// boilerplate-generator. To handle this, _.template settings that have
|
|
|
|
// been verified to work are overridden here on each _.template call.
|
|
|
|
export default function template(text) {
|
|
|
|
return _.template(text, null, {
|
|
|
|
evaluate : /<%([\s\S]+?)%>/g,
|
|
|
|
interpolate : /<%=([\s\S]+?)%>/g,
|
|
|
|
escape : /<%-([\s\S]+?)%>/g,
|
|
|
|
});
|
2018-06-10 10:37:33 +09:00
|
|
|
};
|