Merge pull request #54 from velour/fix_loop

limit babble lengths... loops are not for kids
This commit is contained in:
Chris Sexton 2017-05-30 21:35:10 -04:00 committed by GitHub
commit 0f94b6203e
1 changed files with 4 additions and 0 deletions

View File

@ -546,6 +546,10 @@ func (p *BabblerPlugin) babbleSeed(babblerName string, seed []string) (string, e
break break
} }
words = append(words, curWord.Word) words = append(words, curWord.Word)
if len(words) >= 250 {
break
}
} }
return strings.TrimSpace(strings.Join(words, " ")), nil return strings.TrimSpace(strings.Join(words, " ")), nil