+ 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);
+
+ function insert_done(output, mf) {
+ text += output;
+ }
+
+ if (!params.split) params.split = 2;
+ if (!params.padding) params.padding = 3;
+
+ chunks = text.replace(/^\n+|\n+$/, '').split(new RegExp("\\n{"+params.split+",}"));
+ text = text.match(/^\n+/);
+ if (!text)
+ text = '';
+ padding = '';
+ for(; params.padding; params.padding--) {
+ padding += "\n";