mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
3f86fd7176
commit
40c3099e4e
@ -59,8 +59,8 @@
|
|||||||
stack.pop();
|
stack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(stack);
|
// console.log(stack);
|
||||||
var result = str;
|
var result = str;
|
||||||
var indent = 0;
|
var indent = 0;
|
||||||
@ -83,7 +83,7 @@
|
|||||||
pre = result.substring(0,offset+f.pos+1);
|
pre = result.substring(0,offset+f.pos+1);
|
||||||
post = result.substring(offset+f.pos+1);
|
post = result.substring(offset+f.pos+1);
|
||||||
indented = indentLine(post,indent);
|
indented = indentLine(post,indent);
|
||||||
result = pre+"\n"+indented;
|
result = pre+(/\n$/.test(pre)?"":"\n")+indented;
|
||||||
offset += indented.length-post.length+1;
|
offset += indented.length-post.length+1;
|
||||||
} else {
|
} else {
|
||||||
longStack.push(false);
|
longStack.push(false);
|
||||||
@ -94,7 +94,7 @@
|
|||||||
pre = result.substring(0,offset+f.pos);
|
pre = result.substring(0,offset+f.pos);
|
||||||
post = result.substring(offset+f.pos);
|
post = result.substring(offset+f.pos);
|
||||||
indented = indentLine(post,indent);
|
indented = indentLine(post,indent);
|
||||||
result = pre+"\n"+indented;
|
result = pre+(/\n$/.test(pre)?"":"\n")+indented;
|
||||||
offset += indented.length-post.length+1;
|
offset += indented.length-post.length+1;
|
||||||
}
|
}
|
||||||
longStack.pop();
|
longStack.pop();
|
||||||
|
Loading…
Reference in New Issue
Block a user