diff options
author | Luiza Pagliari <lpagliar@gmail.com> | 2015-10-13 18:39:23 -0300 |
---|---|---|
committer | Luiza Pagliari <lpagliar@gmail.com> | 2015-10-13 18:39:23 -0300 |
commit | 5deb06d5891ce9278b74c253fd85741757b25c82 (patch) | |
tree | f5ccfa0ec6d365712901f5fafaf61c992567fa79 /src/node/handler/PadMessageHandler.js | |
parent | 9d29b15def15c184754665a2f534aa578358cc61 (diff) | |
download | etherpad-lite-5deb06d5891ce9278b74c253fd85741757b25c82.zip |
Create setting to control if a new line will be indented or not
Currently pressing ENTER on a line that ends with ':', '[', '(' or '{'
automaticaly indents the new line with 4 spaces. The variable added by
this commit to settings.json allow an Etherpad instance to not have this
behavior.
Diffstat (limited to 'src/node/handler/PadMessageHandler.js')
-rw-r--r-- | src/node/handler/PadMessageHandler.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index e72625d0..9481889f 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -630,8 +630,8 @@ function handleUserChanges(data, cb) messageLogger.warn("Dropped message, USER_CHANGES Message has no changeset!"); return cb(); } - //TODO: this might happen with other messages too => find one place to copy the session - //and always use the copy. atm a message will be ignored if the session is gone even + //TODO: this might happen with other messages too => find one place to copy the session + //and always use the copy. atm a message will be ignored if the session is gone even //if the session was valid when the message arrived in the first place if(!sessioninfos[client.id]) { @@ -960,7 +960,7 @@ function handleSwitchToPad(client, message) roomClients[i].leave(padId); } } - + // start up the new pad createSessionInfo(client, message); handleClientReady(client, message); @@ -1231,6 +1231,7 @@ function handleClientReady(client, message) "plugins": plugins.plugins, "parts": plugins.parts, }, + "indentationOnNewLine": settings.indentationOnNewLine, "initialChangesets": [] // FIXME: REMOVE THIS SHIT } |