Recognize a search string even if there are spaces after the trigger,
for example, '# sometag' as 'sometag' in the 'tags' view.
Bug: T168225
Change-Id: Ic31b73396d9afe8cd62398b4cf5116f8aee25e67
if ( view !== 'default' ) {
query = query.substr( 1 );
}
if ( view !== 'default' ) {
query = query.substr( 1 );
}
+ // Trim again to also intercept cases where the spaces were after the trigger
+ // eg: '# str'
+ query = query.trim();
// Check if the search if actually empty; this can be a problem when
// we use prefixes to denote different views
// Check if the search if actually empty; this can be a problem when
// we use prefixes to denote different views