Georg b3dd3db30b
Adding show_password_box
Signed-off-by: Georg <georg@lysergic.dev>
2021-06-25 07:28:29 +02:00

20 lines
411 B
JavaScript

/**
* Strips the rails template tags from a js.erb file
*
* @module plugins/railsTemplate
*/
exports.handlers = {
/**
* Remove rails tags from the source input (e.g. <% foo bar %>)
*
* @param e
* @param e.filename
* @param e.source
*/
beforeParse(e) {
if (e.filename.match(/\.erb$/)) {
e.source = e.source.replace(/<%.*%>/g, '');
}
}
};