File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ export function getWordOrder(): FunboxWordOrder {
398398 }
399399}
400400
401- export function getWordsLimit ( ) : number {
401+ export function getLimit ( ) : number {
402402 if ( Config . mode === "zen" ) {
403403 return 0 ;
404404 }
@@ -624,8 +624,13 @@ export async function generateWords(
624624 wordList = [ ] ;
625625 }
626626
627- const limit = getWordsLimit ( ) ;
628- console . debug ( "Words limit" , limit ) ;
627+ const customAndUsingPipeDelimiter =
628+ Config . mode === "custom" && CustomText . getPipeDelimiter ( ) ;
629+
630+ const limit = getLimit ( ) ;
631+ console . debug (
632+ `${ customAndUsingPipeDelimiter ? "Section" : "Word" } limit ${ limit } `
633+ ) ;
629634
630635 if ( wordOrder === "reverse" ) {
631636 wordList = wordList . reverse ( ) ;
@@ -656,7 +661,7 @@ export async function generateWords(
656661 ret . words . push ( nextWord . word ) ;
657662 ret . sectionIndexes . push ( nextWord . sectionIndex ) ;
658663
659- if ( Config . mode === "custom" && CustomText . getPipeDelimiter ( ) ) {
664+ if ( customAndUsingPipeDelimiter ) {
660665 //generate a given number of sections, make sure to not cut a section off
661666 const sectionFinishedAndOverLimit =
662667 currentSection . length === 0 && sectionIndex >= limit ;
You can’t perform that action at this time.
0 commit comments