+ move_up += params.padding_bottom || 0;
+ }
+
+ done(text, move_forward, move_up);
+ }.bind(this);
+
+
+ this.scriptlets['autotag'] = function(context, params, text, move_forward, move_up, done)
+ {
+ if(!text.match(/^\n+$/)) done(text, move_forward, move_up);
+
+ var output = '';
+
+ function insert_done(text, mf, mu) {
+ output += text;
+ }
+
+ if (!params.split) params.split = 2;
+ if (!params.padding) params.padding = 3;
+
+ if (params.tag == 'strofa')
+ tagger = this.scriptlets['insert_stanza'];
+ else
+ tagger = this.scriptlets['insert_tag'];
+
+ var padding_top = text.match(/^\n+/)
+ output = padding_top ? padding_top[0] : '';
+
+ padding = '';
+ for(var i=params.padding; i; --i) {
+ padding += "\n";