mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
15 lines
584 B
JavaScript
15 lines
584 B
JavaScript
![]() |
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,
|
||
|
});
|
||
|
};
|