Skip to content

Commit

Permalink
Bugfix: remove the extra whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ilstar committed Nov 2, 2017
1 parent 5de4e27 commit dfe1051
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bear_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module BearHelper

class ScriptFilter
def initialize(query)
@query = query
@query = query.strip
end

def perform
Expand All @@ -28,7 +28,7 @@ def get_top_10
end.sort_by { |k, v| -v }

if @query.to_s.size > 0
ordered_keywords.select! { |keyword, _| keyword.include?(@query.strip) }
ordered_keywords.select! { |keyword, _| keyword.include?(@query) }
end

ordered_keywords[0..10].map { |keyword, _| keyword }
Expand All @@ -44,7 +44,7 @@ class CallbackUrlGenerator
BEAR_URL_PREFIX = "bear://x-callback-url/search?"

def initialize(query)
@query = query
@query = query.strip
end

def perform
Expand Down

0 comments on commit dfe1051

Please sign in to comment.