Skip to content

Commit ddc3b87

Browse files
authored
Fix bug in unparser
Fix for #44
1 parent 06aec95 commit ddc3b87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/prometheus/unparser.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function Unparser:isValidIdentifier(source)
5858
if(string.find(source, self.numberPattern)) then
5959
return false;
6060
end
61-
return true;
61+
return #source > 0;
6262
end
6363

6464
function Unparser:setPrettyPrint(prettyPrint)
@@ -821,4 +821,4 @@ function Unparser:unparseExpression(expression, tabbing)
821821
error(string.format("\"%s\" is not a valid unparseable expression", expression.kind));
822822
end
823823

824-
return Unparser
824+
return Unparser

0 commit comments

Comments
 (0)