Skip to content

Commit

Permalink
Allow comma when addressing Hubot
Browse files Browse the repository at this point in the history
  • Loading branch information
lautis committed Nov 3, 2011
1 parent fa593c3 commit fc33244
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/robot.coffee
Expand Up @@ -48,9 +48,9 @@ class Robot

pattern = re.join("/") # combine the pattern back again
if @enableSlash
newRegex = new RegExp("^(?:\/|#{@name}:?)\\s*(?:#{pattern})", modifiers)
newRegex = new RegExp("^(?:\/|#{@name}[:,]?)\\s*(?:#{pattern})", modifiers)
else
newRegex = new RegExp("^#{@name}:?\\s*(?:#{pattern})", modifiers)
newRegex = new RegExp("^#{@name}[:,]?\\s*(?:#{pattern})", modifiers)

console.log newRegex.toString()
@listeners.push new TextListener(@, newRegex, callback)
Expand Down

0 comments on commit fc33244

Please sign in to comment.