Skip to content

Commit dd6bf39

Browse files
authored
Update unparser.lua
fix for #126
1 parent c75599e commit dd6bf39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/prometheus/unparser.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,12 @@ function Unparser:unparseExpression(expression, tabbing)
450450

451451
if(expression.kind == AstKind.NumberExpression) then
452452
local str = tostring(expression.value);
453+
if(str == "inf") then
454+
return "2e1024"
455+
end
456+
if(str == "-inf") then
457+
return "-2e1024"
458+
end
453459
if(str:sub(1, 2) == "0.") then
454460
str = str:sub(2);
455461
end

0 commit comments

Comments
 (0)