mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
templateFormatter: fix newlines within function calls resulting in weird behavious
This commit is contained in:
parent
5c14cc32b9
commit
166bd44069
1 changed files with 2 additions and 2 deletions
|
@ -123,7 +123,7 @@ export function parseTemplate(str: string): ParsedTemplate {
|
||||||
// We're parsing a number argument
|
// We're parsing a number argument
|
||||||
// The actual validation of whether this is a number is in dumpArg()
|
// The actual validation of whether this is a number is in dumpArg()
|
||||||
currentVar._state.currentArg += char;
|
currentVar._state.currentArg += char;
|
||||||
} else if (char === " ") {
|
} else if (/\s/.test(char)) {
|
||||||
// Whitespace, ignore
|
// Whitespace, ignore
|
||||||
continue;
|
continue;
|
||||||
} else if (char === '"') {
|
} else if (char === '"') {
|
||||||
|
@ -317,7 +317,7 @@ const baseValues = {
|
||||||
[from, to] = [to, from];
|
[from, to] = [to, from];
|
||||||
}
|
}
|
||||||
|
|
||||||
let randValue = seed != null ? new seedrandom(seed)() : Math.random();
|
const randValue = seed != null ? new seedrandom(seed)() : Math.random();
|
||||||
|
|
||||||
return Math.round(randValue * (to - from) + from);
|
return Math.round(randValue * (to - from) + from);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue