From 1656035159ff087b23755cd78ed4c596d76707e4 Mon Sep 17 00:00:00 2001 From: Ben Clive Date: Mon, 3 Jun 2024 11:28:37 +0100 Subject: [PATCH] clean up lex --- pkg/logql/syntax/lex.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/logql/syntax/lex.go b/pkg/logql/syntax/lex.go index c4cd19671f91c..dffb05ab0189b 100644 --- a/pkg/logql/syntax/lex.go +++ b/pkg/logql/syntax/lex.go @@ -353,7 +353,7 @@ func tryScanBytes(number string, l *Scanner) (uint64, bool) { s := *l consumed := 0 for r := s.Peek(); r != scanner.EOF && !unicode.IsSpace(r); r = s.Peek() { - if !unicode.IsNumber(r) && !isBytesSizeRune(r) && r != '.' && r != '-' { + if !unicode.IsNumber(r) && !isBytesSizeRune(r) && r != '.' { break } _, _ = sb.WriteRune(r)