mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 01:16:15 -04:00
Settings.js: support newlines in default values when using variable substitution
This allows, among other things, to correctly support the configuration of defaultPadText in Docker via an environment variable.
This commit is contained in:
parent
3872690715
commit
79406051fa
4 changed files with 11 additions and 2 deletions
|
@ -474,7 +474,7 @@ function lookupEnvironmentVariables(obj) {
|
|||
* "${ENV_VAR}" or "${ENV_VAR:default_value}")
|
||||
*/
|
||||
// MUXATOR 2019-03-21: we could use named capture groups here once we migrate to nodejs v10
|
||||
const match = value.match(/^\$\{([^:]*)(:(.*))?\}$/);
|
||||
const match = value.match(/^\$\{([^:]*)(:((.|\n)*))?\}$/);
|
||||
|
||||
if (match === null) {
|
||||
// no match: use the value literally, without any substitution
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue