lib/awesome_bot/links.rb in awesome_bot-1.3.1 vs lib/awesome_bot/links.rb in awesome_bot-1.3.2

- old
+ new

@@ -7,12 +7,12 @@ list.reject { |x| x.length < 9 } .map do |x| x.gsub(/'.*/, '').gsub(/,.*/, '').gsub('/:', '/') end .map do |x| - if x.scan(')').count == 2 + if (x.scan(')').count == 2) && (x.scan('(').count == 1) x.gsub(/\)\).*/, ')') - elsif x.scan(')').count == 1 + elsif x.scan(')').count > 0 x.gsub(/\).*/, '') else x end end