2015-09-16 18:01:47 -04:00
|
|
|
module.exports = function() {
|
2015-07-28 07:00:18 -04:00
|
|
|
return {
|
|
|
|
name: 'trimBlankLines',
|
|
|
|
process: function(str) {
|
|
|
|
var lines = str.split(/\r?\n/);
|
2015-09-16 18:01:47 -04:00
|
|
|
while(lines.length && (lines[0].trim() === '')) {
|
2015-07-28 07:00:18 -04:00
|
|
|
lines.shift();
|
|
|
|
}
|
|
|
|
return lines.join('\n');
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|