mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 00:06:30 +01:00
Don't trim input whitespace from webclient, to better support python code input, as per #1935
This commit is contained in:
parent
8a5fbc3931
commit
ecae28b51d
1 changed files with 2 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue