lib/slack-ruby-bot/commands/base.rb in slack-ruby-bot-0.14.0 vs lib/slack-ruby-bot/commands/base.rb in slack-ruby-bot-0.15.0
- old
+ new
@@ -48,10 +48,10 @@
match Regexp.new("^(?<operator>#{values})(?<expression>.*)$", Regexp::IGNORECASE), &block
end
def command(*values, &block)
values = values.map { |value| value.is_a?(Regexp) ? value.source : Regexp.escape(value) }.join('|')
- match Regexp.new("^#{bot_matcher}[\\s]+(?<command>#{values})([\\s]+(?<expression>.*)|)$", Regexp::IGNORECASE | Regexp::MULTILINE), &block
+ match Regexp.new("^#{bot_matcher}[[:space:]]+(?<command>#{values})([[:space:]]+(?<expression>.*)|)$", Regexp::IGNORECASE | Regexp::MULTILINE), &block
end
def invoke(client, data)
finalize_routes!
expression, text = parse(client, data)