3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

templateFormatter: fix newlines within function calls resulting in weird behavious

This commit is contained in:
Dragory 2019-10-11 22:31:48 +03:00
parent 5c14cc32b9
commit 166bd44069

View file

@ -123,7 +123,7 @@ export function parseTemplate(str: string): ParsedTemplate {
// We're parsing a number argument
// The actual validation of whether this is a number is in dumpArg()
currentVar._state.currentArg += char;
} else if (char === " ") {
} else if (/\s/.test(char)) {
// Whitespace, ignore
continue;
} else if (char === '"') {
@ -317,7 +317,7 @@ const baseValues = {
[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);
},