lib/protonbot/titler/plugin.rb in protonbot-titler-0.1.3 vs lib/protonbot/titler/plugin.rb in protonbot-titler-0.1.4
- old
+ new
@@ -34,10 +34,10 @@
body = res.body.to_s
html = Nokogiri::HTML(body)
dat.reply(pattern
.gsub(':NICK', dat[:nick])
.gsub(':URLNUM', (k+1).to_s)
- .gsub(':OUT', "%C%GREEN\u200B" + html.title + '%N'))
+ .gsub(':OUT', "%C%GREEN\u200B" + html.title.strip.gsub(/\n/, ' ') + '%N'))
else
dat.reply(pattern
.gsub(':NICK', dat[:nick])
.gsub(':URLNUM', (k+1).to_s)
.gsub(':OUT', "%C%ORANGE\u200B#{res.code}%N"))
\ No newline at end of file