mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-08 08:25:05 +08:00
fix(custom text): limit being set to incorrect value when using pipe delimiter and simple text mode
!nuf
This commit is contained in:
parent
edf71da1c3
commit
1141051716
1 changed files with 4 additions and 1 deletions
|
|
@ -369,7 +369,10 @@ function apply(): void {
|
|||
CustomText.setPipeDelimiter(state.customTextPipeDelimiter);
|
||||
CustomText.setText(text);
|
||||
|
||||
if (state.customTextLimits.word !== "") {
|
||||
if (state.customTextMode === "simple" && state.customTextPipeDelimiter) {
|
||||
CustomText.setLimitMode("section");
|
||||
CustomText.setLimitValue(text.length);
|
||||
} else if (state.customTextLimits.word !== "") {
|
||||
CustomText.setLimitMode("word");
|
||||
CustomText.setLimitValue(parseInt(state.customTextLimits.word));
|
||||
} else if (state.customTextLimits.time !== "") {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue