output = start_tag + end_tag;
}
- if (text.length === 0) {
- this.XMLEditorMoveCursorForward(context, params.tag.length + 2);
- }
-
this.XMLEditorReplaceSelectedText(context, output);
+
+ if (text.length == 0) {
+ this.XMLEditorMoveCursorForward(context, -params.tag.length-3);
+ }
}.bind(this);
this.scriptlets['lineregexp'] = function(context, params) {
for(var i=0; i < verses.length; i++) {
var verse = verses[i].replace(/^\s+/, "").replace(/\s+$/, "");
if(verse) {
- text += (buf ? buf + '\\\n' : '') + ebuf;
+ text += (buf ? buf + '/\n' : '') + ebuf;
buf = (first ? '<strofa>\n' : '') + verses[i];
ebuf = '';
first = false;