mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Prometheus: Fix term completion that contain keywords (#21295)
- `unless`, `or` and `and` are binary operators - if they appear in a query the query was broken up so the suggestor only works on the current term - this change fixes the splitter logic to make sure those keywords are not inside a word
This commit is contained in:
@@ -49,6 +49,7 @@ describe('Language completion provider', () => {
|
||||
expect(cleanText('foo < bar')).toBe('bar');
|
||||
expect(cleanText('foo >= bar')).toBe('bar');
|
||||
expect(cleanText('foo <= bar')).toBe('bar');
|
||||
expect(cleanText('memory')).toBe('memory');
|
||||
});
|
||||
|
||||
it('removes aggregation syntax', () => {
|
||||
|
||||
Reference in New Issue
Block a user