mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-09 07:09:36 +08:00
fixed quote mode not working with plus funboxes and show all lines
This commit is contained in:
parent
56990f776e
commit
02c973b967
1 changed files with 12 additions and 18 deletions
|
@ -904,7 +904,17 @@ export async function init(): Promise<void> {
|
|||
}
|
||||
|
||||
let wordsBound = 100;
|
||||
if (Config.showAllLines) {
|
||||
if (Config.funbox === "plus_one") {
|
||||
wordsBound = 2;
|
||||
if (Config.mode === "words" && Config.words < wordsBound) {
|
||||
wordsBound = Config.words;
|
||||
}
|
||||
} else if (Config.funbox === "plus_two") {
|
||||
wordsBound = 3;
|
||||
if (Config.mode === "words" && Config.words < wordsBound) {
|
||||
wordsBound = Config.words;
|
||||
}
|
||||
} else if (Config.showAllLines) {
|
||||
if (Config.mode === "quote") {
|
||||
wordsBound = 100;
|
||||
} else if (Config.mode === "custom") {
|
||||
|
@ -956,18 +966,6 @@ export async function init(): Promise<void> {
|
|||
if (Config.mode === "words" && Config.words === 0) {
|
||||
wordsBound = 100;
|
||||
}
|
||||
if (Config.funbox === "plus_one") {
|
||||
wordsBound = 2;
|
||||
if (Config.mode === "words" && Config.words < wordsBound) {
|
||||
wordsBound = Config.words;
|
||||
}
|
||||
}
|
||||
if (Config.funbox === "plus_two") {
|
||||
wordsBound = 3;
|
||||
if (Config.mode === "words" && Config.words < wordsBound) {
|
||||
wordsBound = Config.words;
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
Config.mode == "time" ||
|
||||
|
@ -1133,11 +1131,7 @@ export async function init(): Promise<void> {
|
|||
|
||||
if (w === undefined) return;
|
||||
|
||||
if (Config.showAllLines) {
|
||||
wordsBound = w.length;
|
||||
} else {
|
||||
wordsBound = Math.min(wordsBound, w.length);
|
||||
}
|
||||
wordsBound = Math.min(wordsBound, w.length);
|
||||
|
||||
for (let i = 0; i < wordsBound; i++) {
|
||||
if (/\t/g.test(w[i])) {
|
||||
|
|
Loading…
Add table
Reference in a new issue