Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};
/**
* This extension will be used by default for all template files
*/
exports.extension = '.ejs';
/**
* Original templating engine
*/
exports.module = 'ejs';
/**
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};
module.exports = ejs;
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};
/**
* This extension will be used by default for all template files
*/
exports.extension = '.ejs';
/**
* Original templating engine
*/
exports.module = 'ejs';
/**
* Get source template filename
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};
/**
* This extension will be used by default for all template files
*/
exports.extension = '.ejs';
/**
* Original templating engine
*/
exports.module = 'ejs';
/**
* Get source template filename
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};
/**
* This extension will be used by default for all template files
*/
exports.extension = '.ejs';
/**
* Original templating engine
*/
exports.module = 'ejs';
/**
* Get source template filename
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};
/**
* This extension will be used by default for all template files
*/
exports.extension = '.ejs';
/**
* Original templating engine
*/
exports.module = 'ejs';
/**
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};
/**
* This extension will be used by default for all template files
*/
exports.extension = '.ejs';
/**
* Original templating engine
*/
exports.module = 'ejs';
/**
// monkey patch ejs
var ejs = require('ejs'), old_parse = ejs.parse;
ejs.parse = function () {
var str = old_parse.apply(this, Array.prototype.slice.call(arguments));
return str.replace('var buf = [];', 'var buf = []; arguments.callee.buf = buf;');
};
module.exports = ejs;
const ejs = require('ejs')
const parse = ejs.parse
ejs.parse = function (str, options) {
str = str.replace(/^\s+|\s+$|[\r\n]+/gm, '')
return parse.apply(this, [str, options])
}
const ejs = require('ejs')
const parse = ejs.parse
ejs.parse = function (str, options) {
str = str.replace(/^\s+|\s+$|[\r\n]+/gm, '')
return parse.apply(this, [str, options])
}