Restore previous behavior where spaces between label terms are acceptable in Promparse

Signed-off-by: Owen Williams <owen.williams@grafana.com>
This commit is contained in:
Owen Williams 2024-02-08 14:38:26 -05:00
parent 58eb877f96
commit 9ec4026ed3

View file

@ -446,11 +446,8 @@ func (p *PromParser) parseLVals() error {
// Free trailing commas are allowed. NOTE: this allows spaces between label
// names, unlike in OpenMetrics. It is not clear if this is intended or an
// accidental bug.
t = p.nextToken()
if t == tComma {
if t = p.nextToken(); t == tComma {
t = p.nextToken()
} else if t != tBraceClose {
return p.parseError("expected comma or brace close", t)
}
}
}