Skip to content

Commit

Permalink
[EuiSearchBar] Allow @ special character in query string searches (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed May 8, 2024
1 parent d37d82d commit cba31a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelogs/upcoming/7702.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Updated `EuiSearchBar` to allow the `@` special character in query string searches
4 changes: 2 additions & 2 deletions src/components/search_bar/query/default_syntax.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,12 +871,12 @@ describe('defaultSyntax', () => {
});

test('special characters', () => {
const ast = defaultSyntax.parse('*_-:');
const ast = defaultSyntax.parse('*_-:@');
const clauses = ast.getTermClauses();
expect(clauses).toEqual([
{
type: 'term',
value: '*_-:',
value: '*_-:@',
match: 'must',
},
]);
Expand Down
2 changes: 1 addition & 1 deletion src/components/search_bar/query/default_syntax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ word
wordChar
= alnum
/ [-_*:/]
/ [-_*:/@]
/ escapedChar
/ extendedGlyph
Expand Down

0 comments on commit cba31a5

Please sign in to comment.