Skip to content

Commit 1141051

Browse files
committed
fix(custom text): limit being set to incorrect value when using pipe delimiter and simple text mode
!nuf
1 parent edf71da commit 1141051

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

frontend/src/ts/modals/custom-text.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,10 @@ function apply(): void {
369369
CustomText.setPipeDelimiter(state.customTextPipeDelimiter);
370370
CustomText.setText(text);
371371

372-
if (state.customTextLimits.word !== "") {
372+
if (state.customTextMode === "simple" && state.customTextPipeDelimiter) {
373+
CustomText.setLimitMode("section");
374+
CustomText.setLimitValue(text.length);
375+
} else if (state.customTextLimits.word !== "") {
373376
CustomText.setLimitMode("word");
374377
CustomText.setLimitValue(parseInt(state.customTextLimits.word));
375378
} else if (state.customTextLimits.time !== "") {

0 commit comments

Comments
 (0)