Preserve newlines in jsonata expression via tabs

This commit is contained in:
Nick O'Leary 2016-11-16 13:44:45 +00:00
parent 26f5305593
commit 8caee09ea4
1 changed files with 2 additions and 2 deletions

View File

@ -104,9 +104,9 @@
expand:function() { expand:function() {
var that = this; var that = this;
RED.editor.editExpression({ RED.editor.editExpression({
value: jsonata.format(this.value()), value: this.value().replace(/\t/g,"\n"),
complete: function(v) { complete: function(v) {
that.value(v.replace(/\s*\n\s*/g," ")); that.value(v.replace(/\n/g,"\t"));
} }
}) })
} }