From 87a7d74fc33c94df719f50be3ca016dd2809b617 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 9 Oct 2019 17:54:28 +0100 Subject: [PATCH] a chain has failed to generate if the result is the same as the input --- modules/markov.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/markov.py b/modules/markov.py index 1508ad99..91360ef0 100644 --- a/modules/markov.py +++ b/modules/markov.py @@ -167,4 +167,7 @@ class Module(ModuleManager.BaseModule): break words.append(third_word) + if words == first_words: + return None + return " ".join(words)