Skip to content

Commit

Permalink
autocomplete.php: Stop trimming text after a -
Browse files Browse the repository at this point in the history
Fixes #1446
  • Loading branch information
reedy committed Jan 3, 2024
1 parent 115ea50 commit b2edffc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php/autocomplete.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

// TODO: Why do we do this?
/**
* Trim anything after a hyphen, period or left paren
* Trim anything after a period or left paren
* @param $query
* @return string
*/
function trim_query($query) {
$chunks = preg_split("/[-.(]/", $query);
$chunks = preg_split("/[.(]/", $query);
return trim($chunks[0]);
}

Expand Down

0 comments on commit b2edffc

Please sign in to comment.