Skip to content
Snippets Groups Projects

Issue #3509590: Allow trailing whitespace in the query

1 file
+ 3
4
Compare changes
  • Side-by-side
  • Inline
@@ -27,10 +27,9 @@ class AutocompleteHelper implements AutocompleteHelperInterface {
*/
public function splitKeys($keys) {
$keys = ltrim($keys);
// If there is whitespace or a quote on the right, all words have been
// completed.
if (rtrim($keys, " \"") != $keys) {
return [rtrim($keys, ' '), ''];
// If there is a quote on the right, all words have been completed.
if (rtrim($keys, "\"") != $keys) {
return [$keys, ''];
}
if (preg_match('/^(.*?)\s*"?([\S]*)$/', $keys, $m)) {
return [$m[1], $m[2]];
Loading