Skip to content

Commit

Permalink
Merge pull request #10 from marijnz0r/patch-1
Browse files Browse the repository at this point in the history
Remove space character from the replace function
  • Loading branch information
bbrala authored Jun 22, 2018
2 parents d32dde7 + 5f4505e commit 8864c08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TermBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public static function terms($search){

// Remove every boolean operator (+, -, > <, ( ), ~, *, ", @distance) from the search query
// else we will break the MySQL query.
$search = preg_replace('/[+\-><\(\)~*\"@]+/', ' ', $search);
$search = rtrim(preg_replace('/[+\-><\(\)~*\"@]+/', ' ', $search));

$terms = collect(preg_split('/[\s,]+/', $search));

Expand Down

0 comments on commit 8864c08

Please sign in to comment.