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:
David
2019-12-30 18:03:35 +01:00
committed by GitHub
parent 355b906493
commit 649fa6789e
2 changed files with 2 additions and 1 deletions

View File

@@ -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', () => {