Don't trim input whitespace from webclient, to better support python code input, as per #1935

This commit is contained in:
Griatch 2019-09-22 19:22:15 +02:00
parent 8a5fbc3931
commit ecae28b51d

View file

@ -28,9 +28,9 @@ let defaultin_plugin = (function () {
case 13: // Enter key
var outtext = inputfield.val() || ""; // Grab the text from which-ever inputfield is focused
if ( !event.shiftKey ) { // Enter Key without shift --> send Mesg
var lines = outtext.trim().replace(/[\r]+/,"\n").replace(/[\n]+/, "\n").split("\n");
var lines = outtext.replace(/[\r]+/,"\n").replace(/[\n]+/, "\n").split("\n");
for (var i = 0; i < lines.length; i++) {
plugin_handler.onSend( lines[i].trim() );
plugin_handler.onSend( lines[i] );
}
inputfield.val(""); // Clear this inputfield
event.preventDefault();