From 8caee09ea48a46245e17cdad492626c7d42e102d Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 16 Nov 2016 13:44:45 +0000 Subject: [PATCH] Preserve newlines in jsonata expression via tabs --- editor/js/ui/common/typedInput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/js/ui/common/typedInput.js b/editor/js/ui/common/typedInput.js index 6f18a4884..e7a26cf3d 100644 --- a/editor/js/ui/common/typedInput.js +++ b/editor/js/ui/common/typedInput.js @@ -104,9 +104,9 @@ expand:function() { var that = this; RED.editor.editExpression({ - value: jsonata.format(this.value()), + value: this.value().replace(/\t/g,"\n"), complete: function(v) { - that.value(v.replace(/\s*\n\s*/g," ")); + that.value(v.replace(/\n/g,"\t")); } }) }