Skip to content

Commit

Permalink
Making the regular expression a little more fool proof.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcbaldwin committed Jan 17, 2012
1 parent 8635165 commit eba5847
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/shorten.coffee
@@ -1,9 +1,9 @@
# Shorten URLs with bit.ly
#
# (bitly|shorten) me <url> - Shorten the URL using bit.ly
# (bitly|shorten) (me) <url> - Shorten the URL using bit.ly

module.exports = (robot) ->
robot.respond /(bitly|shorten) (me)? (.+)$/, (msg) ->
robot.respond /(bitly|shorten)\s?(me)?\s?(.+)$/, (msg) ->
msg
.http("http://api.bitly.com/v3/shorten")
.query
Expand Down

0 comments on commit eba5847

Please sign in to comment.