Skip to content

Commit

Permalink
Fix newlines in url description/title
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyLemon committed May 31, 2017
1 parent 9a1fb1b commit fd1f27c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/url.coffee
Expand Up @@ -9,10 +9,10 @@ module.exports = (bot) ->
bot.fetchHTML url, ($)->
if $
stack = []
stack.push $("title").eq(0).text().replace(/\s\s+/g, "").replace(/ /g,'')
stack.push $("title").eq(0).text().replace(/\s\s+/g, "").replace(/ /g,'').replace(/\n/g, "")
opis = $("meta[name=description]").attr("content")
if opis
stack.push opis.replace(/\s\s+/g, "")
stack.push opis.replace(/\s\s+/g, "").replace(/ /g,'').replace(/\n/g, "")
cb stack.join("\n")

bot.on 'user:talk', (r) ->
Expand Down

0 comments on commit fd1f27c

Please sign in to comment.