diff --git a/main.lua b/main.lua index 91dd937..8990e3e 100644 --- a/main.lua +++ b/main.lua @@ -424,12 +424,15 @@ local function get_topics_from_comparison_message(message) if comp then local topics = {} for topic in message:gmatch('[^'..comp..']+') do - topics[#topics+1] = clean_text(topic) + local topic_text = clean_text(topic) + if topic_text:match '[^%s]' then + topics[#topics+1] = topic_text + end end -- Rev if comp == '>' then topics = reverse(topics) end -- - return topics + return (#topics >= 2) and topics or nil end -- Natural language comparisons