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
|
||||
// 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);
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue