diff util/jsonpointer.lua @ 13883:b713da7527d2

teal: Regenerate Lua files
author Kim Alvefur <zash@zash.se>
date Fri, 09 May 2025 00:50:36 +0200
parents 22066b02887f
children
line wrap: on
line diff
--- a/util/jsonpointer.lua	Fri May 09 00:48:40 2025 +0200
+++ b/util/jsonpointer.lua	Fri May 09 00:50:36 2025 +0200
@@ -1,5 +1,4 @@
-local m_type = math.type;
-
+-- This file is generated from teal-src/prosody/util/jsonpointer.tl
 local function unescape_token(escaped_token)
 	local unescaped = escaped_token:gsub("~1", "/"):gsub("~0", "~")
 	return unescaped
@@ -17,10 +16,10 @@
 
 		if type(idx) == "string" then
 			new_ref = ref[token]
-		elseif m_type(idx) == "integer" then
+		elseif math.type(idx) == "integer" then
 			local i = tonumber(token)
 			if token == "-" then
-				i = #ref + 1
+				i = #(ref) + 1
 			end
 			new_ref = ref[i + 1]
 		else